AudioMatchingService class
Service for buffering and segmenting user's recorded audio and matching it against reference audio files
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAudioChunk(
List< int> chunk) → void - Add audio chunk to buffer
-
clearBuffer(
) → void - Clear buffer
-
extractSegment(
int durationMs) → Uint8List? - Extract audio segment of specified duration from buffer start Duration in milliseconds
-
getBuffer(
) → Uint8List - Get current buffer as Uint8List
-
matchWithWords(
Uint8List userAudio, {double minScore = 0.6, int maxMatches = 10}) → Future< List< ({double score, String wordKey})> > - Match audio with word-level reference
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processAudio(
) → void - Process audio for matching (now purely buffer management as audio files are removed)
-
removeProcessedBytes(
int count) → void - Remove the first N bytes from buffer (after processing)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
calculateDurationMs(
Uint8List audio) → int - Calculate audio duration in milliseconds
Constants
- bytesPerSample → const int
- bytesPerSecond → const int
- maxBufferSize → const int
- sampleRate → const int
- samplesPerSecond → const int