AudioReferenceService class
Service for managing reference audio files and comparing user recitation
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clearCache(
) → void - Clear audio cache to free memory
-
compareRecitationWithReference(
Uint8List userAudio, Uint8List referenceAudio) → double - Compare user's recorded audio segment with reference audio Returns similarity score (0.0 to 1.0) Uses ultra-fast comparison with aggressive downsampling for real-time performance
-
findBestVerseMatch(
int surahNumber, Uint8List userAudio, {int maxVerses = 286}) → Future< ({double score, int verseNumber})?> - Find best matching reference audio segment for user audio Tries all verses in a surah and returns the best match
-
getCacheStats(
) → String - Get cache statistics
-
loadReferenceAudio(
int surahNumber, int verseNumber) → Future< Uint8List?> - Load reference audio for a specific surah and verse Audio files should be stored in: assets/audio/surah_XXX/verse_YYY.pcm
-
loadWordAudio(
String wordKey) → Future< Uint8List?> - Load reference audio for a word Audio files should be stored in: assets/audio/words/{word_key}.pcm