Results¶
These are read-only settings that report the results of model inference.
The exact meaning depends on the context in which they are read. begin-ms, for example, refers to the start time of a word in word-iterator, but to the onset of speech detection in ^end.
Most results are valid only for the duration of the event or iterator callback handler where they are available in. If a result is shown as begin available in all events, you can also read it outside of event callbacks.
Read results with the Session get function that matches the type of the setting. For example, use getDouble to retrieve double values.
audio-stream¶
result output stream read-only
Segmented audio data stream.
- For enrollment tasks with save-enroll-audio is set to
1(on) this is the enrollment recording. If save-enroll-audio is0(off), audio will only be available in the ^fail event. - For recognition tasks, the samples from audio-stream-from to audio-stream-to selected from the last audio-stream-size samples processed by the recognizer. The default audio-stream-size
0, which disables audio buffering and will causeaudio-streamretrieval to fail. Be sure to set audio-stream-size to the expected number of samples before calling push or run.
all
all
audio-stream-size, audio-stream-from, audio-stream-to, audio-stream-first, audio-stream-last
audio-stream-first¶
result double read-only
Audio buffer start sample index.
The index of the first (oldest) audio sample contained in the audio-stream.
all
all
audio-stream-last¶
result double read-only
available-point¶
result int read-only
begin-ms¶
result double read-only
Timestamp of the audio start point.
The offset in ms from the beginning of the audio stream where:
- the recognition unit started in ^result or ^result-partial, or
- the VAD first detected speech in ^begin, ^end, or ^limit.
^begin, ^end, ^limit, ^result, ^result-partial
model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator
begin-sample¶
result double read-only
Sample index of the audio start point.
The offset in samples from the beginning of the audio stream where:
- the recognition unit started in ^result or ^result-partial, or
- the VAD first detected speech in ^begin, ^end, or ^limit.
^begin, ^end, ^limit, ^result, ^result-partial
model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator
confidence-score¶
result double read-only 6.14.0
Fixed-phrase wake word confidence score.
Deprecated
Confidence score support will be removed from the next major release of this SDK.
Do not use this in new code.
The probability of the spotted phrase being a true accept. This is a model-dependent optional feature not universally supported. It is not supported by enrolled models, use sv-score instead.
The reported range is 0 to 1, or < 0 if not supported by the spotter model.
none
domain¶
result string read-only stt 7.5.0
STT recognition domain.
This is short label identifying the domain identified by the STT recognizer, for example: automotive or numbers. This value is NULL if the recognizer does not support multiple domains.
none
dsp.production-ready¶
result int read-only
Whether the DSP model files are suitable for production use.
Possible values:
0: The dsp-acmodel-stream has enforced event limits. The model will stop working after a pre-determined number of recognition events, or audio samples processed. This model is not suitable for production use.
1: The dsp-acmodel-stream is not limited, and can be used in products.
Note
This read-only value is valid only after a dsp-header-stream conversion is complete.
all
all
dsp.t-slice-version¶
result string read-only
Embedded port version.
This is the minimum version of the embedded port (also known as the t-slice version) required to run the dsp-acmodel-stream and dsp-search-stream DSP data files.
Note
This read-only value is valid only after a dsp-acmodel-stream conversion is complete.
all
all
end-ms¶
result double read-only
Timestamp of the audio endpoint.
The offset in ms from the beginning of the audio stream:
^end, ^limit, ^result, ^result-partial
model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator
end-sample¶
result double read-only
Sample index of the audio endpoint.
The offset in samples from the beginning of the audio stream:
^end, ^limit, ^result, ^result-partial
model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator
enrollment-count¶
result int read-only
Enrollment count.
The number of enrollments accumulated for the enrolled user.
none
enrollment-id¶
result int read-only
Enrollment ID.
A unique ID for the current user's current enrollment.
frame-count¶
configuration double read-only pre-release
Number of feature frames read from the input stream.
Pre-release
This is an experimental feature. Do not use unless recommended by Sensory.
all
all
id¶
result int read-only
Recognition ID result.
Unique wake word phrase result ID, compatible with THF Micro. For most single-phrase spotters this will be 1.
model-stream¶
result output stream read-only
Enrolled wake word model stream.
The result after enrollment and adaptation. This is a model that will recognize the enrolled phrases. Save to permanent storage with copy.
Retrieving the model stream will fail with SETTING_NOT_AVAILABLE if there are no enrolled users.
none
nlu-entity-count¶
result int read-only tnl stt
Number of NLU entities available.
Reports the number of entities the current nlu-intent-value contains.
An entity is typically an object that an intent action operates on.
nlu-entity-name, nlu-entity-score, nlu-entity-value, nlu-intent-value
nlu-entity-name¶
result string read-only tnl stt
nlu-entity-score.¶
result string read-only stt
Score of the current entity.
Reports the confidence the model has that this entity was classified correctly. Not all NLU models report scores. If the score is not available it is reported as 0.
If you know the name of the entity, you can retrieve the value directly without having to use nlu-entity-iterator by appending the name to nlu-entity-score.
Example
nlu-entity-value.¶
result string read-only tnl stt
Captured value of the current entity.
If you know the name of the entity, you can retrieve the value directly without having to use nlu-entity-iterator by appending the name to nlu-entity-value.
Example
nlu-intent-name¶
result string read-only tnl stt
nlu-intent-score¶
result double read-only stt
Score of the current NLU intent.
Reports the confidence the model has that the intent was classified correctly. Not all NLU models report scores. If the score is not available it is reported as 0.
none
nlu-intent-value¶
result string read-only tnl stt
Captured value of the current NLU intent.
This is the part of the recognition result classified as the current intent.
none
nlu-match-count¶
result int read-only tnl stt
Number of NLU result matches available.
Reports the number of NLU matches that are available for this result. The available matches are capped by nlu-match-max.
Multiple matches are only possible when there's ambiguity in the NLU grammar: One input sequence matches multiple output sequences, or when the .* match-any-word operator results in multiple valid segmentations.
none
nlu-match-index¶
result int read-only tnl stt
The current NLU match index.
Reports the current NLU match for ^nlu-slot. The best-scoring match will have nlu-match-index == 0.
none
nlu-slot-count¶
result int read-only tnl stt
Number of NLU child slots available.
Reports the number of child slots the current nlu-slot-value contains. For final value slots this count is 0.
nlu-slot-name¶
result string read-only tnl stt
nlu-slot-score.¶
result double read-only stt
Score of the current NLU slot.
Reports the confidence the model has that this slot was classified correctly. Not all NLU models report scores. If the score is not available it is reported as 0.
If you know the name of the (possibly nested) slot, you can retrieve the value directly without having to use nlu-slot-iterator. Separate slot names in the hierarchy with a period.
Example
nlu-slot-value.¶
result string read-only tnl stt
Captured value of the current NLU slot.
Use nlu-slot-value to retrieve the string value of the current NLU slot.
If you know the name of the (possibly nested) slot, you can retrieve the value directly without having to use nlu-slot-iterator Separate slot names in the hierarchy with a period.
Example
With this grammar:
ampm = am | pm;
time = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
alarm = set the alarm for {time} {ampm};
grammar = <s> {alarm} </s>;
noise-energy¶
result double read-only
Noise energy.
The energy (in dB relative to 1.0) in the background audio preceding the wake word audio.
none
percent-done¶
profile:real-time¶
result double read-only
Seconds spent in model inference since last reset.
Reports the number of wall-clock seconds spent running the model. This depends on having a usable real-time clock implementation.
none
none
reason¶
result string read-only
Reason for enrollment failure.
Provides a shorthand indication of why a wake word enrollment was rejected.
| Reason | Guidance |
|---|---|
energy-min | Please speak louder. |
energy-stddev | This recording does not sound like speech. |
silence-begin | Please wait for the prompt before speaking. |
silence-end | The trailing silence too short. |
snr | The recording is too noisy. Please move to a quieter environment. |
rec-variance | The difference between the recordings is too large. Please repeat the exact same phrase. |
poor-rec-limit | The recording may not contain speech. Please speak a consistent trigger. |
clipping | The recording is clipped, please reduce the volume. |
vowel-duration | Please speak more slowly, or choose a different phrase with more vowel sounds. |
repetition | This phrase has too many repeated sounds. Please choose another. |
silence-in-phrase | Please don't pause - even briefly - in the middle of the recording. |
spot | Please say the exact enrollment phrase, speaking clearly and naturally. |
phrase-quality | This phrase is not suitable, please choose another or speak a little more slowly. |
audio-quality | The enrollment shows signs of problems with the audio hardware. |
audio-duration | The enrollment recording is too short. |
audio-volume | No audio detected. Please speak louder. |
audio-failure | varies |
All reason values and corresponding guidance
reason-guidance¶
result string read-only
End-user guidance to correct a wake word enrollment failure.
Provides a human-readable string (in English) with a suggestion on how to correct an enrollment failure.
reason-pass¶
reason-threshold¶
result double read-only
reason-value¶
result double read-only
Enrollment check failure value.
The value of a enrollment check parameter. This is compared to reason-threshold to determine reason-pass.
result-count¶
result int read-only
Recognition result count.
The total number of items available in the current list iteration.
result-index¶
result int read-only
Recognition result index.
The index of the item under consideration in the current list iteration.
sample-count¶
result double read-only
score¶
result double read-only
Recognition score.
A value between 0 and 1 that indicates how well the acoustic evidence matches the recognizer's expectations.
In phrase spotters that report this score, the operating point is set by thresholding this value.
Note
score is not supported by all recognizer types. For older models, getDouble will report an SETTING_NOT_FOUND error.
Recent models that do not support scoring report OK and a score value of -1.0
signal-energy¶
result double read-only
Signal energy.
The energy (in dB relative to 1.0) in the spotted phrase.
none
snr¶
result double read-only
Signal to noise ratio.
The ratio of the wake word signal energy to the noise energy, in dB.
none
sv-score¶
result double read-only
Speaker verification score.
The confidence that the spotted phrase was spoken by the enrolled speaker, in the range 0 to 1. For non-enrolled spotters the confidence is always 1.
none
text¶
result string read-only
Recognition text result.
The phrase, word, or phoneme hypothesis from a wake word, LVCSR, or STT recognizer.
^result, ^result-partial, ^slm-result, ^slm-result-partial
model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, vocab-iterator, word-iterator
user-count¶
result int read-only
Enrolled user count.
The number of distinct enrolled users.
This setting is only available for phrasespot models that continuously adapt to speakers' voices.
none
user-index¶
result int read-only
Enrolled user index.
The index of the item under consideration in the current user list iteration.
none