Iterators¶
Use these keys with forEach to loop over lists of values. The values for these settings refer to runtime instances of code objects and are not serialized by save or dup.
The results and iterators available in the loop functions vary by iterator. See the descriptions below for details on what these are.
Iterators are available only in the events listed, except for those marked as all, which you can use outside of event callbacks too.
Use iterators to do model introspection (e.g. vocab-iterator) or to obtain finer-grained results, such as word-level alignments an scores available with word-iterator.
enrollment-iterator¶
iterator handle write-only
Iterate over all wake word enrollments for the current user.
This can be used to retrieve enrollment audio if save-enroll-audio is enabled.
all
audio-stream, audio-stream-first, audio-stream-last, begin-sample, end-sample, enrollment-id, user
none
model-iterator¶
iterator handle write-only
Iterate over the phoneme parts in a result.
begin-ms, begin-sample, end-ms, end-sample, score, text
none
nlu-entity-iterator¶
iterator handle write-only tnl stt
Iterate over NLU entities in the current intent.
This iterator invokes the specified handler for each of the nlu-entity-count entities found for the current intent.
nlu-entity-count, nlu-entity-name, nlu-entity-score, nlu-entity-value
none
nlu-slot-iterator¶
iterator handle write-only tnl stt
Iterate over NLU child result slots.
This iterator invokes the specified handler for each of the NLU result slots found in the current NLU slot value, nlu-slot-value.
nlu-slot-count, nlu-slot-name, nlu-slot-score, nlu-slot-value
nlu-word-iterator¶
iterator handle write-only tnl stt
Iterate over the words in an NLU result.
Valid only for LVCSR recognizers that include NLU post-processing. This post-processing can insert, delete, or change words in the recognition result and those changes are available here.
begin-ms, begin-sample, end-ms, end-sample, score, text
none
operating-point-iterator¶
iterator handle write-only
phone-iterator¶
iterator handle write-only
Iterate over the phonemes in a result.
STT models do not report any sub-word unit hypotheses.
begin-ms, begin-sample, end-ms, end-sample, score, text
none
phrase-iterator¶
iterator handle write-only
Iterate over recognition phrase hypotheses.
Most recognizers provide only the top-scoring recognition result. phrase-iterator is useful only when an LVCSR recognizer is configured to provide N-best results; when result-max > 1.
begin-ms, begin-sample, end-ms, end-sample, score, text
none
reason-iterator¶
iterator handle write-only
Iterate over all reasons for wake word enrollment failure.
reason, reason-guidance, reason-pass, reason-threshold, reason-value
none
user-iterator¶
iterator handle write-only
Iterate over all enrolled users.
Sets user to each of the enrolled users before invoking the callback.
all
none
vocab-iterator¶
word-iterator¶
iterator handle write-only
Iterate over the words in a result.
User-defined enrolled results are modeled as a single word.
begin-ms, begin-sample, end-ms, end-sample, score, text
none