Skip to content

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

#define SNSR_AUDIO_STREAM "audio-stream"
public class Snsr {
  public final static String AUDIO_STREAM = "audio-stream";
}

Segmented audio data stream.

all

all

audio-stream-size, audio-stream-from, audio-stream-to, audio-stream-first, audio-stream-last

audio-stream-first

result double read-only

#define SNSR_AUDIO_STREAM_FIRST "audio-stream-first"
public class Snsr {
  public final static String AUDIO_STREAM_FIRST = "audio-stream-first";
}

Audio buffer start sample index.

The index of the first (oldest) audio sample contained in the audio-stream.

all

all

audio-stream, audio-stream-last

audio-stream-last

result double read-only

#define SNSR_AUDIO_STREAM_LAST "audio-stream-last"
public class Snsr {
  public final static String AUDIO_STREAM_LAST = "audio-stream-last";
}

The index of the last (most recent) audio sample contained in the audio-stream.

all

all

audio-stream, audio-stream-first

available-point

result int read-only

#define SNSR_RES_AVAILABLE_POINT "available-point"
public class Snsr {
  public final static String RES_AVAILABLE_POINT = "available-point";
}

Available operating point.

none

operating-point-iterator

operating-point

begin-ms

result double read-only

#define SNSR_RES_BEGIN_MS "begin-ms"
public class Snsr {
  public final static String RES_BEGIN_MS = "begin-ms";
}

Timestamp of the audio start point.

The offset in ms from the beginning of the audio stream where:

^begin, ^end, ^limit, ^result, ^result-partial

model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator

begin-sample, end-ms, end-sample

begin-sample

result double read-only

#define SNSR_RES_BEGIN_SAMPLE "begin-sample"
public class Snsr {
  public final static String RES_BEGIN_SAMPLE = "begin-sample";
}

Sample index of the audio start point.

The offset in samples from the beginning of the audio stream where:

^begin, ^end, ^limit, ^result, ^result-partial

model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator

begin-ms, end-ms, end-sample

confidence-score

result double read-only 6.14.0

#define SNSR_RES_CONF_SCORE "confidence-score"
public class Snsr {
  public final static String RES_CONF_SCORE = "confidence-score";
}

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.

^result

none

^result, score, sv-score

domain

result string read-only stt 7.5.0

#define SNSR_RES_DOMAIN "domain"
public class Snsr {
  public final static String RES_DOMAIN = "domain";
}

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.

^result, ^result-partial

none

^result

dsp.production-ready

result int read-only

#define SNSR_RES_EMBEDDED_MODEL_PRODUCTION_READY "dsp.production-ready"
public class Snsr {
  public final static String RES_EMBEDDED_MODEL_PRODUCTION_READY = "dsp.production-ready";
}

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-acmodel-stream, dsp.t-slice-version

dsp.t-slice-version

result string read-only

#define SNSR_RES_MIN_EMBEDDED_VERSION "dsp.t-slice-version"
public class Snsr {
  public final static String RES_MIN_EMBEDDED_VERSION = "dsp.t-slice-version";
}

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

dsp-acmodel-stream, dsp.production-ready, dsp-target

end-ms

result double read-only

#define SNSR_RES_END_MS "end-ms"
public class Snsr {
  public final static String RES_END_MS = "end-ms";
}

Timestamp of the audio endpoint.

The offset in ms from the beginning of the audio stream:

  • where the recognition unit ended in ^result, or
  • the VAD last detected speech in ^end or ^limit.

^end, ^limit, ^result, ^result-partial

model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator

begin-ms, begin-sample, end-sample

end-sample

result double read-only

#define SNSR_RES_END_SAMPLE "end-sample"
public class Snsr {
  public final static String RES_END_SAMPLE = "end-sample";
}

Sample index of the audio endpoint.

The offset in samples from the beginning of the audio stream:

  • where the recognition unit ended in ^result, or
  • the VAD last detected speech in ^end or ^limit.

^end, ^limit, ^result, ^result-partial

model-iterator, nlu-word-iterator, phone-iterator, phrase-iterator, word-iterator

begin-ms, begin-sample, end-ms

enrollment-count

result int read-only

#define SNSR_RES_ENROLLMENT_COUNT "enrollment-count"
public class Snsr {
  public final static String RES_ENROLLMENT_COUNT = "enrollment-count";
}

Enrollment count.

The number of enrollments accumulated for the enrolled user.

none

enrollment-iterator, user-iterator

req-enroll, user-iterator

enrollment-id

result int read-only

#define SNSR_RES_ENROLLMENT_ID "enrollment-id"
public class Snsr {
  public final static String RES_ENROLLMENT_ID = "enrollment-id";
}

Enrollment ID.

A unique ID for the current user's current enrollment.

^fail, ^pass

enrollment-iterator

frame-count

configuration double read-only pre-release

#define SNSR_RES_FRAMES "frame-count"
public class Snsr {
  public final static String RES_FRAMES = "frame-count";
}

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

#define SNSR_RES_ID "id"
public class Snsr {
  public final static String RES_ID = "id";
}

Recognition ID result.

Unique wake word phrase result ID, compatible with THF Micro. For most single-phrase spotters this will be 1.

^result

vocab-iterator

text

model-stream

result output stream read-only

#define SNSR_MODEL_STREAM "model-stream"
public class Snsr {
  public final static String MODEL_STREAM = "model-stream";
}

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.

^done

none

nlu-entity-count

result int read-only tnl stt

#define SNSR_RES_NLU_ENTITY_COUNT "nlu-entity-count"
public class Snsr {
  public final static String RES_NLU_ENTITY_COUNT = "nlu-entity-count";
}

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-intent

nlu-entity-iterator

nlu-entity-name, nlu-entity-score, nlu-entity-value, nlu-intent-value

nlu-entity-name

result string read-only tnl stt

#define SNSR_RES_NLU_ENTITY_NAME "nlu-entity-name"
public class Snsr {
  public final static String RES_NLU_ENTITY_NAME = "nlu-entity-name";
}

Name of the current entity.

Valid only in nlu-entity-iterator callback handlers.

none

nlu-entity-iterator

^nlu-intent, nlu-entity-score, nlu-entity-value

nlu-entity-score.

result string read-only stt

#define SNSR_RES_NLU_ENTITY_SCORE "nlu-entity-score."
public class Snsr {
  public final static String RES_NLU_ENTITY_SCORE = "nlu-entity-score.";
}

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

double score;
snsrGetDouble(session, SNSR_RES_NLU_ENTITY_SCORE "alarm.time", &score);
double score = session.getDouble(Snsr.RES_NLU_ENTITY_SCORE + "alarm.time");

^nlu-intent

nlu-entity-iterator

nlu-entity-name, nlu-entity-value

nlu-entity-value.

result string read-only tnl stt

#define SNSR_RES_NLU_ENTITY_VALUE "nlu-entity-value."
public class Snsr {
  public final static String RES_NLU_ENTITY_VALUE = "nlu-entity-value.";
}

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

char *atime;
snsrGetString(session, SNSR_RES_NLU_ENTITY_VALUE "alarm.time", &atime);
String atime = session.getString(Snsr.RES_NLU_ENTITY_VALUE + "alarm.time");

^nlu-intent

nlu-entity-iterator

nlu-entity-name, nlu-entity-score

nlu-intent-name

result string read-only tnl stt

#define SNSR_RES_NLU_INTENT_NAME "nlu-intent-name"
public class Snsr {
  public final static String RES_NLU_INTENT_NAME = "nlu-intent-name";
}

The name of the current NLU intent.

^nlu-intent

none

nlu-intent-value, nlu-intent-score

nlu-intent-score

result double read-only stt

#define SNSR_RES_NLU_INTENT_SCORE "nlu-intent-score"
public class Snsr {
  public final static String RES_NLU_INTENT_SCORE = "nlu-intent-score";
}

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.

^nlu-intent

none

nlu-intent-name, nlu-intent-value

nlu-intent-value

result string read-only tnl stt

#define SNSR_RES_NLU_INTENT_VALUE "nlu-intent-value"
public class Snsr {
  public final static String RES_NLU_INTENT_VALUE = "nlu-intent-value";
}

Captured value of the current NLU intent.

This is the part of the recognition result classified as the current intent.

^nlu-intent

none

nlu-intent-name, nlu-intent-score

nlu-match-count

result int read-only tnl stt

#define SNSR_RES_NLU_COUNT "nlu-match-count"
public class Snsr {
  public final static String RES_NLU_COUNT = "nlu-match-count";
}

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.

Example

g = <s> {first .*} {second .*} </s>;

^nlu-slot

none

nlu-match-index, nlu-match-max

nlu-match-index

result int read-only tnl stt

#define SNSR_RES_NLU_INDEX "nlu-match-index"
public class Snsr {
  public final static String RES_NLU_INDEX = "nlu-match-index";
}

The current NLU match index.

Reports the current NLU match for ^nlu-slot. The best-scoring match will have nlu-match-index == 0.

^nlu-slot

none

nlu-match-count, nlu-match-max

nlu-slot-count

result int read-only tnl stt

#define SNSR_RES_NLU_SLOT_COUNT "nlu-slot-count"
public class Snsr {
  public final static String RES_NLU_SLOT_COUNT = "nlu-slot-count";
}

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

nlu-slot-iterator

nlu-slot-name, nlu-slot-score, nlu-slot-value

nlu-slot-name

result string read-only tnl stt

#define SNSR_RES_NLU_SLOT_NAME "nlu-slot-name"
public class Snsr {
  public final static String RES_NLU_SLOT_NAME = "nlu-slot-name";
}

Name of the current NLU slot.

^nlu-slot

nlu-slot-iterator

nlu-slot-score, nlu-slot-value

nlu-slot-score.

result double read-only stt

#define SNSR_RES_NLU_SLOT_SCORE "nlu-slot-score."
public class Snsr {
  public final static String RES_NLU_SLOT_SCORE = "nlu-slot-score.";
}

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

double score;
snsrGetDouble(session, SNSR_RES_NLU_SLOT_SCORE "alarm.time", &score);
double score = session.getDouble(Snsr.RES_NLU_SLOT_SCORE + "alarm.time");

^nlu-slot

nlu-slot-iterator

nlu-slot-name, nlu-slot-value

nlu-slot-value.

result string read-only tnl stt

#define SNSR_RES_NLU_SLOT_VALUE "nlu-slot-value."
public class Snsr {
  public final static String RES_NLU_SLOT_VALUE = "nlu-slot-value.";
}

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>;
Use this code snippet to retrieve the time and am/pm slot values in the ^nlu-slot callback:

const char *timeHours;
const char *ampm;
snsrGetString(session, SNSR_RES_NLU_SLOT_VALUE "alarm.time", &timeHours);
snsrGetString(session, SNSR_RES_NLU_SLOT_VALUE "alarm.ampm", &ampm);
String timeHours = session.getString(Snsr.RES_NLU_SLOT_VALUE + "alarm.time");
String ampm = session.getString(Snsr.RES_NLU_SLOT_VALUE + "alarm.ampm");

^nlu-slot

nlu-slot-iterator

nlu-slot-count, nlu-slot-name

noise-energy

result double read-only

#define SNSR_RES_NOISE_ENERGY "noise-energy"
public class Snsr {
  public final static String RES_NOISE_ENERGY = "noise-energy";
}

Noise energy.

The energy (in dB relative to 1.0) in the background audio preceding the wake word audio.

^result

none

signal-energy, snr

percent-done

result double read-only

#define SNSR_RES_PERCENT_DONE "percent-done"
public class Snsr {
  public final static String RES_PERCENT_DONE = "percent-done";
}

Enrollment progress.

A value between 0 and 100 that is an estimate of the enrollment task completion progress.

^progress

none

^adapted, ^enrolled

profile:real-time

result double read-only

#define SNSR_RES_CPU_SECONDS_USED "profile:real-time"
public class Snsr {
  public final static String RES_CPU_SECONDS_USED = "profile:real-time";
}

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

profile, CONFIG_CLOCK_FUNC

reason

result string read-only

#define SNSR_RES_REASON "reason"
public class Snsr {
  public final static String RES_REASON = "reason";
}

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

^fail

reason-iterator

reason-guidance

reason-guidance

result string read-only

#define SNSR_RES_GUIDANCE "reason-guidance"
public class Snsr {
  public final static String RES_GUIDANCE = "reason-guidance";
}

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.

^fail

reason-iterator

reason

reason-pass

result int read-only

#define SNSR_RES_REASON_PASS "reason-pass"
public class Snsr {
  public final static String RES_REASON_PASS = "reason-pass";
}

Enrollment success.

1 if the enrollment passed, 0 if it was rejected.

reason-threshold

result double read-only

#define SNSR_RES_REASON_THRESHOLD "reason-threshold"
public class Snsr {
  public final static String RES_REASON_THRESHOLD = "reason-threshold";
}

Enrollment check threshold value.

^fail

reason-iterator

reason-pass, reason-value

reason-value

result double read-only

#define SNSR_RES_REASON_VALUE "reason-value"
public class Snsr {
  public final static String RES_REASON_VALUE = "reason-value";
}

Enrollment check failure value.

The value of a enrollment check parameter. This is compared to reason-threshold to determine reason-pass.

^fail

reason-iterator

reason-pass, reason-threshold

result-count

result int read-only

#define SNSR_RES_COUNT "result-count"
public class Snsr {
  public final static String RES_COUNT = "result-count";
}

Recognition result count.

The total number of items available in the current list iteration.

^result, phrase-iterator, word-iterator

result-index

result int read-only

#define SNSR_RES_INDEX "result-index"
public class Snsr {
  public final static String RES_INDEX = "result-index";
}

Recognition result index.

The index of the item under consideration in the current list iteration.

^result

phrase-iterator, word-iterator

sample-count

result double read-only

#define SNSR_RES_SAMPLES "sample-count"
public class Snsr {
  public final static String RES_SAMPLES = "sample-count";
}

Number of samples read from the input stream.

all

all

^sample-count

score

result double read-only

#define SNSR_RES_SCORE "score"
public class Snsr {
  public final static String RES_SCORE = "score";
}

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

^result, ^result-partial

phone-iterator, phrase-iterator, word-iterator

signal-energy

result double read-only

#define SNSR_RES_SIGNAL_ENERGY "signal-energy"
public class Snsr {
  public final static String RES_SIGNAL_ENERGY = "signal-energy";
}

Signal energy.

The energy (in dB relative to 1.0) in the spotted phrase.

^result

none

noise-energy, snr

snr

result double read-only

#define SNSR_RES_SNR "snr"
public class Snsr {
  public final static String RES_SNR = "snr";
}

Signal to noise ratio.

The ratio of the wake word signal energy to the noise energy, in dB.

^result

none

^result, noise-energy, signal-energy

sv-score

result double read-only

#define SNSR_RES_SV_SCORE "sv-score"
public class Snsr {
  public final static String RES_SV_SCORE = "sv-score";
}

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.

^result

none

score, sv-threshold

text

result string read-only

#define SNSR_RES_TEXT "text"
public class Snsr {
  public final static String RES_TEXT = "text";
}

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

#define SNSR_RES_USER_COUNT "user-count"
public class Snsr {
  public final static String RES_USER_COUNT = "user-count";
}

Enrolled user count.

The number of distinct enrolled users.

This setting is only available for phrasespot models that continuously adapt to speakers' voices.

^adapted, ^new-user

none

user-index

result int read-only

#define SNSR_RES_USER_INDEX "user-index"
public class Snsr {
  public final static String RES_USER_INDEX = "user-index";
}

Enrolled user index.

The index of the item under consideration in the current user list iteration.

none

user-iterator