Read-only audio match result.
Syntax
AudioMatchThis class cannot be constructed directly.
Parameters
None
Returns
—Behavior / side effects
Read-only audio match result. Score is similarity, not an accuracy probability. find() timestamps use the listening session timeline; match() uses the searched audio value's timeline. Compare timestamps to avoid handling one sound repeatedly. Only use timestamps as detections when matched is True.
Execution
- Blocking: Conditional
- Thread safety: Not guaranteed
- Parallel execution: Conditional
Execution cost and waits depend on the documented operation. Keep mutable values in their owning flow; sharing arbitrary objects between flows has no general thread-safety guarantee.
Example
# Save the alert sample in Template Manager before running
sample = Audio("alert")
Audio.start()
wait(1500)
clip = Audio.recent(1500)
result = clip.match(sample, 0.85)
print(result.matched, result.score, result.start_ms, result.end_ms)
Audio.stop()Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
None
Fields
| Name | Description |
|---|---|
matchedBoolean | True when a non-silent candidate meets the threshold. |
scoreNumber | Similarity from 0 to 1, not a probability. |
start_msNumber | Candidate start time in milliseconds on the searched audio timeline. |
end_msNumber | Exclusive end time in milliseconds on the same timeline as start_ms. |