HighlightingController class

Bridges speech recognition engine output to per-word visual highlighting in the UI.

Inheritance

Constructors

HighlightingController({required QuranRepository repository, required SherpaEngine engine, VoidCallback? onAyahChanged, bool isTajweed = true, TrackerConfig config = const TrackerConfig()})

Properties

activeAyah → ValueNotifier<int?>
final
completedAyahs → Set<int>
Completed ayahs for the currently targeted surah.
no setter
config ↔ TrackerConfig
getter/setter pair
currentMatchedVerse → VerseMatch?
no setter
debugRecognizedText → ValueNotifier<String>
final
globalRevision → ValueNotifier<int>
final
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isTajweed ↔ bool
getter/setter pair
onAyahChanged → VoidCallback?
final
repository → QuranRepository
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → TrackerState
no setter
targetSurah → int
no setter
tracker → HighlightingController
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearHighlights() → void
Wipes every tracked surah's highlights.
clearHighlightsForSurah(int surah) → void
Wipes only surah's highlights, leaving every other tracked surah untouched.
clearHighlightsFromAyah(int startAyah) → void
completedAyahsFor(int surah) → Set<int>
Completed ayahs for any tracked surah — e.g. the surah just left behind by a setTargetSurah retarget with preserveOtherSurahStates.
dispose() → void
Discards any resources used by the object.
override
feed(Float32List audioChunk, {bool isFinal = false}) → void
finalize() → void
flushAndResetForNextAyah() → void
forceActiveAyah(QuranVerse verse) → void
getWordErrors(int ayah, int wordIndex, {int? surah}) → List<ReciterError>?
isWordGreen(int ayah, int wordIndex, {int? surah}) → bool
surah defaults to the currently targeted surah; pass it explicitly to read another tracked surah's highlights (e.g. after a preserveOtherSurahStates retarget moved tracking past it).
isWordNeutral(int ayah, int wordIndex, {int? surah}) → bool
isWordRed(int ayah, int wordIndex, {int? surah}) → bool
isWordYellow(int ayah, int wordIndex, {int? surah}) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
reloadEngine() → Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
resumeTracking() → void
setManualAyah(int surah, int ayah) → void
setTajweedMode(bool active) → void
setTargetSurah(int surah, {bool preserveOtherSurahStates = false, bool clearTargetSurah = true}) → Future<void>
Sets the actively tracked surah, reloading its phoneme reference.
startRecordingSession() → void
toString() → String
A string representation of this object.
inherited
unloadEngine() → void
updateConfig(TrackerConfig newConfig) → void
Dynamically updates the recitation tracker difficulty or timing at runtime.

Operators

operator ==(Object other) → bool
The equality operator.
inherited