AsrTokenProcessor class
Ingests raw CTC tokens and timestamps from Sherpa-ONNX, filters special/blank tokens, and computes accurate acoustic phoneme durations reflecting real recitation articulation.
Constructors
- AsrTokenProcessor({TrackerConfig config = const TrackerConfig()})
Properties
- config ↔ TrackerConfig
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- lookaheadDelay → double
-
no setter
- maxTokenDuration → double
-
no setter
- 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
-
process(
TranscriptionResult result) → ProcessedAudioStream - Ingests a new TranscriptionResult from the ASR recognizer, updates filtered tokens and recomputes continuous acoustic durations.
-
reset(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isElasticContinuant(
String tok) → bool - Identifies sounds that can absorb acoustic prolongation (Madd vowels, Shaddah gemination, Ghunnah).
-
isGhunnahToken(
String tok) → bool - Determines if a token represents an acoustic Ghunnah (held nasal sound).
-
isMaddToken(
String tok) → bool - Determines if a token is a prolonged vocalic Madd sound (ا, آ, و, ي, ى, ۥ, ۦ, ٰ, ٱ, ٲ).
-
isShaddahToken(
String tok) → bool - Determines if a token represents an acoustic Shaddah (doubled consonant).
Constants
- ctcLookaheadDelay → const double
- Standard CTC lookahead delay for causal Zipformer streaming models.