HighlightingController class
Bridges speech recognition engine output to per-word visual highlighting in the UI.
- Inheritance
-
- Object
- ChangeNotifier
- HighlightingController
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> -
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 -
clearHighlightsFromAyah(
int startAyah) → void -
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) → List< ReciterError> ? -
isWordGreen(
int ayah, int wordIndex) → bool -
isWordNeutral(
int ayah, int wordIndex) → bool -
isWordRed(
int ayah, int wordIndex) → bool -
isWordYellow(
int ayah, int wordIndex) → 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) → Future< void> -
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