StreamingSession

interface StreamingSession

A StreamingSession matches instances of Signature against a Catalog.

By passing a continuous stream of data to the matchStream method, matches are returned via recognitionResults. ShazamKit will convert the data to Signature objects internally and perform matches against the Catalog. The details of how the matching is performed is an implementation detail and is subject to change. As such there will be many values emitted by the flow per stream of audio, and the same match may be reported multiple times in succession.

Functions

matchStream
Link copied to clipboard
abstract fun matchStream(audioData: ByteArray, meaningfulLengthInBytes: Int, timestampInMs: Long)
Flow audio buffers for matching into the session.
recognitionResults
Link copied to clipboard
abstract fun recognitionResults(): Flow<MatchResult>
A flow for communicating the results of matching.

Properties

catalog
Link copied to clipboard
abstract val catalog: Catalog
The Catalog used to initialize this session and which all matches will be made against.