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.
Most applications don't use iterators directly — recognition results arrive via ^result without iteration. The two most useful when you do reach for them are word-iterator (per-word alignments and scores) and vocab-iterator (model introspection); see the descriptions below for the rest.
Page conventions
Settings are grouped by concern. Within each group they're listed alphabetically. A setting that serves more than one concern appears once under its primary group; secondary groups link to it.
Wake word & command set¶
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
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
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
LVCSR & STT¶
model-iterator¶
iterator handle write-only
Documented under Wake word & command set (model-iterator).
phone-iterator¶
iterator handle write-only
Documented under Wake word & command set (phone-iterator).
phrase-iterator¶
iterator handle write-only tnl
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
word-iterator¶
iterator handle write-only
Documented under Wake word & command set (word-iterator).
NLU & SLM¶
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
Enrollment & adaptation¶
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
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