---
source_path: "api/setting-keys/results.md"
canonical_url: "https://doc.sensory.com/tnl/7.8/api/setting-keys/results/"
---

# Results

These are read-only settings that report the results of model [inference](https://doc.sensory.com/tnl/7.8/api/inference.md#inference).

The exact meaning depends on the context in which they are read.
[begin-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-ms), for example, refers to the start time of a word in [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator),
but to the onset of speech detection in [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end).

Most results are valid only for the duration of
the [&bull; event](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#events)
or [&bull; iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#iterators) [callback](https://doc.sensory.com/tnl/7.8/api/inference.md#callback) handler
where they are available in. If a result is shown as begin available in
&bull; _all_ events, you can also
read it outside of event callbacks.

Read results with the [Session](https://doc.sensory.com/tnl/7.8/api/inference.md#session) `get` function that matches the type of the
setting. For example, use [getDouble](https://doc.sensory.com/tnl/7.8/api/inference.md#getters) to retrieve
_(double)_ values.

The handful of results most applications read:

| Name | Type | Available in | Summary |
|------|------|--------------|---------|
| [text](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#text) | string | `^result`, `^result-partial`, `^slm-result*`; word and phrase iterators | Phrase, word, or phoneme hypothesis. |
| [score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#score) | double | `^result`, `^result-partial`; word and phrase iterators | How well audio matches the recognizer; threshold for spotters. |
| [begin-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-ms) / [end-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-ms) | double | `^result`, `^result-partial`, `^begin`, `^end`, `^limit`; alignment iterators | Audio start / endpoint timestamps. |
| [nlu-intent-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-name) | string | `^nlu-intent` | Top-level NLU intent. |
| [nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value) | string | `^nlu-intent` | Captured value for the current NLU intent. |

Everything else on this page is either context-specific or rarely needed.

<!-- Setting-key page conventions: shared admonition for all docs/api/setting-keys/*.md pages. -->
### Details: 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.

The code tabs on each setting show one paste-able call site per language.
Adapt the placeholder names (`s` for the [Session](https://doc.sensory.com/tnl/7.8/api/inference.md#session), plus `value`,
`stream`, `on_event`, or `on_item` for the operand) to your code. Each
example assumes the language's standard prelude:

<!-- tab: c -->

**C/C++**

```c
#include <snsr.h>
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
import com.sensory.speech.snsr.Snsr;
import com.sensory.speech.snsr.SnsrSession;
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
import snsr
```
<!-- /tab -->

For the full Session lifecycle (`snsrNew`, `new SnsrSession()`,
`snsr.Session(...)`) see [Your first program](https://doc.sensory.com/tnl/7.8/getting-started/your-first-program.md#your-first-program).

## Audio I/O

### audio-stream
- result
- output stream
- read-only

<!-- tab: c -->

**C/C++**

```c
SnsrStream stream;
snsrGetStream(s, SNSR_AUDIO_STREAM, &stream);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
SnsrStream stream = s.getStream(Snsr.AUDIO_STREAM);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
stream = s.get_stream(snsr.AUDIO_STREAM)
```
<!-- /tab -->

Segmented audio data stream.

* For enrollment tasks with [save-enroll-audio](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#save-enroll-audio) is set to `1` (on)
  this is the enrollment recording. If [save-enroll-audio](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#save-enroll-audio) is `0` (off),
  audio will only be available in the [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail) event.
* For recognition tasks, the samples from [audio-stream-from](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#audio-stream-from) to
  [audio-stream-to](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#audio-stream-to) selected from the last [audio-stream-size](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#audio-stream-size)
  samples processed by the recognizer.
  The default [audio-stream-size](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#audio-stream-size) `0`, which disables audio
  buffering and will cause `audio-stream` retrieval to fail.
  Be sure to set [audio-stream-size](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#audio-stream-size) to the expected number of
  samples before calling [push](https://doc.sensory.com/tnl/7.8/api/inference.md#push) or [run](https://doc.sensory.com/tnl/7.8/api/inference.md#run).

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [audio-stream-size](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#audio-stream-size), [audio-stream-from](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#audio-stream-from), [audio-stream-to](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#audio-stream-to),
[audio-stream-first](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream-first), [audio-stream-last](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream-last)

### audio-stream-first
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_AUDIO_STREAM_FIRST, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.AUDIO_STREAM_FIRST);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.AUDIO_STREAM_FIRST)
```
<!-- /tab -->

Audio buffer start sample index.

The index of the first (oldest) audio sample contained in the [audio-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream).

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [audio-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream), [audio-stream-last](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream-last)

### audio-stream-last
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_AUDIO_STREAM_LAST, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.AUDIO_STREAM_LAST);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.AUDIO_STREAM_LAST)
```
<!-- /tab -->

The index of the last (most recent) audio sample contained in the [audio-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream).

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [audio-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream), [audio-stream-first](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#audio-stream-first)

### frame-count
- configuration
- double
- read-only
- pre-release
<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_FRAMES, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_FRAMES);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_FRAMES)
```
<!-- /tab -->

Number of feature frames read from the input stream.

**Pre-release:**

This is an experimental feature. Do not use unless recommended by Sensory.

**Available in these events:** _all_

**Available in these iterators:** _all_

### sample-count
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SAMPLES, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SAMPLES);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SAMPLES)
```
<!-- /tab -->

Number of samples read from the input stream.

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [^sample-count](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#sample-count-event)

## Wake word & command set

### available-point
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_AVAILABLE_POINT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_AVAILABLE_POINT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_AVAILABLE_POINT)
```
<!-- /tab -->

Available operating point.

**Available in these events:** _none_

**Available in these iterators:** [operating-point-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#operating-point-iterator)

**Also see these related items:** [operating-point](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#operating-point)

### confidence-score
- result
- double
- read-only
- deprecated [6.14.0](https://doc.sensory.com/tnl/7.8/changes/version-6.md#v6.14.0)
<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_CONF_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_CONF_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_CONF_SCORE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#sv-score) instead.

The reported range is `0` to `1`, or `< 0`
if not supported by the spotter model.

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** _none_

**Also see these related items:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#score), [sv-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#sv-score)

### id
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_ID, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_ID);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_ID)
```
<!-- /tab -->

Recognition ID result.

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

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** [vocab-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#vocab-iterator)

**Also see these related items:** [text](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#text)

### noise-energy
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_NOISE_ENERGY, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_NOISE_ENERGY);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_NOISE_ENERGY)
```
<!-- /tab -->

Noise energy.

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

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** _none_

**Also see these related items:** [signal-energy](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#signal-energy), [snr](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#snr)

### score
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SCORE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/inference.md#getters) will report an
[SETTING_NOT_FOUND](https://doc.sensory.com/tnl/7.8/api/inference.md#rc) error.

Recent models that do not support scoring report [OK](https://doc.sensory.com/tnl/7.8/api/inference.md#rc_ok)
and a score value of `-1.0`

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

### signal-energy
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SIGNAL_ENERGY, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SIGNAL_ENERGY);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SIGNAL_ENERGY)
```
<!-- /tab -->

Signal energy.

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

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** _none_

**Also see these related items:** [noise-energy](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#noise-energy), [snr](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#snr)

### snr
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SNR, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SNR);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SNR)
```
<!-- /tab -->

Signal to noise ratio.

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

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** _none_

**Also see these related items:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [noise-energy](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#noise-energy), [signal-energy](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#signal-energy)

### sv-score
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SV_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SV_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SV_SCORE)
```
<!-- /tab -->

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`.

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** _none_

**Also see these related items:** [score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#score), [sv-threshold](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#sv-threshold)

### text
- result
- string
- read-only

<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_TEXT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_TEXT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_TEXT)
```
<!-- /tab -->

Recognition text result.

The phrase, word, or phoneme hypothesis from a wake word,
LVCSR, or STT recognizer.

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial), [^slm-result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#slm-result), [^slm-result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#slm-result-partial)

**Available in these iterators:** [model-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#model-iterator), [nlu-word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-word-iterator), [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [vocab-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#vocab-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

## LVCSR & STT

### result-count
- result
- int
- read-only
- TrulyNatural only
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_COUNT)
```
<!-- /tab -->

Recognition result count.

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

**Also see these related items:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

### result-index
- result
- int
- read-only
- TrulyNatural only
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_INDEX, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_INDEX);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_INDEX)
```
<!-- /tab -->

Recognition result index.

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

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

**Available in these iterators:** [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

### score
- result
- double
- read-only

Documented under **Wake word & command set** ([score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#score)).

### text
- result
- string
- read-only

Documented under **Wake word & command set** ([text](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#text)).

## Alignment & timing

### begin-ms
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_BEGIN_MS, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_BEGIN_MS);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_BEGIN_MS)
```
<!-- /tab -->

Timestamp of the audio start point.

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

* the recognition unit started in [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result) or [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial), or
* the VAD first detected speech in [^begin](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#begin), [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), or [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit).

**Available in these events:** [^begin](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#begin), [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit), [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** [model-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#model-iterator), [nlu-word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-word-iterator), [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

**Also see these related items:** [begin-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-sample), [end-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-ms), [end-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-sample)

### begin-sample
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_BEGIN_SAMPLE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_BEGIN_SAMPLE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_BEGIN_SAMPLE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result) or [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial), or
* the VAD first detected speech in
  [^begin](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#begin), [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), or [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit).

**Available in these events:** [^begin](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#begin), [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit), [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** [model-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#model-iterator), [nlu-word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-word-iterator), [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

**Also see these related items:** [begin-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-ms), [end-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-ms), [end-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-sample)

### end-ms
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_END_MS, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_END_MS);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_END_MS)
```
<!-- /tab -->

Timestamp of the audio endpoint.

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

* where the recognition unit ended in [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), or
* the VAD last detected speech in
  [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end) or [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit).

**Available in these events:** [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit), [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** [model-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#model-iterator), [nlu-word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-word-iterator), [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

**Also see these related items:** [begin-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-ms), [begin-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-sample), [end-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-sample)

### end-sample
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_END_SAMPLE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_END_SAMPLE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_END_SAMPLE)
```
<!-- /tab -->

Sample index of the audio endpoint.

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

* where the recognition unit ended in [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), or
* the VAD last detected speech in
  [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end) or [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit).

**Available in these events:** [^end](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#end), [^limit](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#limit), [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** [model-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#model-iterator), [nlu-word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-word-iterator), [phone-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phone-iterator), [phrase-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#phrase-iterator), [word-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#word-iterator)

**Also see these related items:** [begin-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-ms), [begin-sample](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#begin-sample), [end-ms](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#end-ms)

## NLU & SLM

### domain
- result
- string
- read-only
_(STT only)_ 
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_DOMAIN, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_DOMAIN);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_DOMAIN)
```
<!-- /tab -->

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.

**Available in these events:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result), [^result-partial](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result-partial)

**Available in these iterators:** _none_

**Also see these related items:** [^result](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#result)

### nlu-entity-count
- result
- int
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_NLU_ENTITY_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_NLU_ENTITY_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_NLU_ENTITY_COUNT)
```
<!-- /tab -->

Number of NLU entities available.

Reports the number of entities the current [nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value) contains.

An entity is typically an object that an intent action operates on.

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** [nlu-entity-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)

**Also see these related items:** [nlu-entity-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-name), [nlu-entity-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-score), [nlu-entity-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-value),
[nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value)

### nlu-entity-name
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_ENTITY_NAME, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_ENTITY_NAME);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_ENTITY_NAME)
```
<!-- /tab -->

Name of the current entity.

Valid only in [nlu-entity-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator) callback handlers.

**Available in these events:** _none_

**Available in these iterators:** [nlu-entity-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)

**Also see these related items:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent), [nlu-entity-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-score), [nlu-entity-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-value)

### nlu-entity-score.
- result
- string
- read-only
- STT only
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_ENTITY_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_ENTITY_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_ENTITY_SCORE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)
by appending the name to `nlu-entity-score.`

**Example:**

<!-- tab: c -->

**C/C++**

```c
double score;
snsrGetDouble(session, SNSR_RES_NLU_ENTITY_SCORE "alarm.time", &score);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double score = session.getDouble(Snsr.RES_NLU_ENTITY_SCORE + "alarm.time");
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
score = session.get_double(snsr.RES_NLU_ENTITY_SCORE + "alarm.time")
```
<!-- /tab -->

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** [nlu-entity-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)

**Also see these related items:** [nlu-entity-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-name), [nlu-entity-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-value)

### nlu-entity-value.
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_ENTITY_VALUE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_ENTITY_VALUE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_ENTITY_VALUE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)
by appending the name to `nlu-entity-value.`

**Example:**

<!-- tab: c -->

**C/C++**

```c
char *atime;
snsrGetString(session, SNSR_RES_NLU_ENTITY_VALUE "alarm.time", &atime);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String atime = session.getString(Snsr.RES_NLU_ENTITY_VALUE + "alarm.time");
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
atime = session.get_string(snsr.RES_NLU_ENTITY_VALUE + "alarm.time")
```
<!-- /tab -->

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** [nlu-entity-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-entity-iterator)

**Also see these related items:** [nlu-entity-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-name), [nlu-entity-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-entity-score)

### nlu-intent-name
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_INTENT_NAME, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_INTENT_NAME);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_INTENT_NAME)
```
<!-- /tab -->

The name of the current NLU intent.

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** _none_

**Also see these related items:** [nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value), [nlu-intent-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-score)

### nlu-intent-score
- result
- double
- read-only
- STT only
<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_NLU_INTENT_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_NLU_INTENT_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_NLU_INTENT_SCORE)
```
<!-- /tab -->

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`.

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** _none_

**Also see these related items:** [nlu-intent-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-name), [nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value)

### nlu-intent-value
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_INTENT_VALUE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_INTENT_VALUE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_INTENT_VALUE)
```
<!-- /tab -->

Captured value of the current NLU intent.

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

**Available in these events:** [^nlu-intent](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-intent)

**Available in these iterators:** _none_

**Also see these related items:** [nlu-intent-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-name), [nlu-intent-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-score)

### nlu-match-count
- result
- int
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_NLU_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_NLU_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_NLU_COUNT)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#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>;
```

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** _none_

**Also see these related items:** [nlu-match-index](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-match-index), [nlu-match-max](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#nlu-match-max)

### nlu-match-index
- result
- int
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_NLU_INDEX, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_NLU_INDEX);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_NLU_INDEX)
```
<!-- /tab -->

The current NLU match index.

Reports the current NLU match for [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot).
The best-scoring match will have `nlu-match-index == 0`.

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** _none_

**Also see these related items:** [nlu-match-count](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-match-count), [nlu-match-max](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#nlu-match-max)

### nlu-slot-count
- result
- int
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_NLU_SLOT_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_NLU_SLOT_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_NLU_SLOT_COUNT)
```
<!-- /tab -->

Number of NLU child slots available.

Reports the number of child slots the current [nlu-slot-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-value) contains.
For final value slots this count is `0`.

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** [nlu-slot-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-slot-iterator)

**Also see these related items:** [nlu-slot-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-name), [nlu-slot-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-score), [nlu-slot-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-value)

### nlu-slot-name
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_SLOT_NAME, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_SLOT_NAME);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_SLOT_NAME)
```
<!-- /tab -->

Name of the current NLU slot.

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** [nlu-slot-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-slot-iterator)

**Also see these related items:** [nlu-slot-score](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-score), [nlu-slot-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-value)

### nlu-slot-score.
- result
- double
- read-only
- STT only
<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_NLU_SLOT_SCORE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_NLU_SLOT_SCORE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_NLU_SLOT_SCORE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-slot-iterator).
Separate slot names in the hierarchy with a period.

**Example:**

<!-- tab: c -->

**C/C++**

```c
double score;
snsrGetDouble(session, SNSR_RES_NLU_SLOT_SCORE "alarm.time", &score);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double score = session.getDouble(Snsr.RES_NLU_SLOT_SCORE + "alarm.time");
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
score = session.get_double(snsr.RES_NLU_SLOT_SCORE + "alarm.time")
```
<!-- /tab -->

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** [nlu-slot-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-slot-iterator)

**Also see these related items:** [nlu-slot-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-name), [nlu-slot-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-value)

### nlu-slot-value.
- result
- string
- read-only
_(TrulyNatural only)_ _(STT only)_
<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_NLU_SLOT_VALUE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_NLU_SLOT_VALUE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_NLU_SLOT_VALUE)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#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](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot) callback:

<!-- tab: c -->

**C/C++**

```c
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);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String timeHours = session.getString(Snsr.RES_NLU_SLOT_VALUE + "alarm.time");
String ampm = session.getString(Snsr.RES_NLU_SLOT_VALUE + "alarm.ampm");
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
time_hours = session.get_string(snsr.RES_NLU_SLOT_VALUE + "alarm.time")
ampm = session.get_string(snsr.RES_NLU_SLOT_VALUE + "alarm.ampm")
```
<!-- /tab -->

**Available in these events:** [^nlu-slot](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#nlu-slot)

**Available in these iterators:** [nlu-slot-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#nlu-slot-iterator)

**Also see these related items:** [nlu-slot-count](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-count), [nlu-slot-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-slot-name)

### text
- result
- string
- read-only

Documented under **Wake word & command set** ([text](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#text)). SLM results are
reported via this key; NLU intents use [nlu-intent-name](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-name) and
[nlu-intent-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#nlu-intent-value) instead.

## Enrollment & adaptation

### enrollment-count
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_ENROLLMENT_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_ENROLLMENT_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_ENROLLMENT_COUNT)
```
<!-- /tab -->

Enrollment count.

The number of enrollments accumulated for the enrolled user.

**Available in these events:** _none_

**Available in these iterators:** [enrollment-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#enrollment-iterator), [user-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#user-iterator)

**Also see these related items:** [req-enroll](https://doc.sensory.com/tnl/7.8/api/setting-keys/configuration.md#req-enroll), [user-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#user-iterator)

### enrollment-id
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_ENROLLMENT_ID, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_ENROLLMENT_ID);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_ENROLLMENT_ID)
```
<!-- /tab -->

Enrollment ID.

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

**Available in these events:** [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail), [^pass](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#pass)

**Available in these iterators:** [enrollment-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#enrollment-iterator)

### model-stream
- result
- output stream
- read-only

<!-- tab: c -->

**C/C++**

```c
SnsrStream stream;
snsrGetStream(s, SNSR_MODEL_STREAM, &stream);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
SnsrStream stream = s.getStream(Snsr.MODEL_STREAM);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
stream = s.get_stream(snsr.MODEL_STREAM)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/io.md#stream-copy).

Retrieving the model stream will fail with [SETTING_NOT_AVAILABLE](https://doc.sensory.com/tnl/7.8/api/inference.md#rc)
if there are no enrolled users.

**Available in these events:** [^done](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#done)

**Available in these iterators:** _none_

### percent-done
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_PERCENT_DONE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_PERCENT_DONE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_PERCENT_DONE)
```
<!-- /tab -->

Enrollment progress.

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

**Available in these events:** [^progress](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#progress)

**Available in these iterators:** _none_

**Also see these related items:** [^adapted](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#adapted), [^enrolled](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#enrolled)

### reason
- result
- string
- read-only

<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_REASON, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_REASON);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_REASON)
```
<!-- /tab -->

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*

**Available in these events:** [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail)

**Available in these iterators:** [reason-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#reason-iterator)

**Also see these related items:** [reason-guidance](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-guidance)

### reason-guidance
- result
- string
- read-only

<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_GUIDANCE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_GUIDANCE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_GUIDANCE)
```
<!-- /tab -->

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.

**Available in these events:** [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail)

**Available in these iterators:** [reason-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#reason-iterator)

**Also see these related items:** [reason](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason)

### reason-pass
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_REASON_PASS, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_REASON_PASS);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_REASON_PASS)
```
<!-- /tab -->

Enrollment success.

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

### reason-threshold
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_REASON_THRESHOLD, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_REASON_THRESHOLD);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_REASON_THRESHOLD)
```
<!-- /tab -->

Enrollment check threshold value.

**Available in these events:** [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail)

**Available in these iterators:** [reason-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#reason-iterator)

**Also see these related items:** [reason-pass](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-pass), [reason-value](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-value)

### reason-value
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_REASON_VALUE, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_REASON_VALUE);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_REASON_VALUE)
```
<!-- /tab -->

Enrollment check failure value.

The value of an enrollment check parameter. This is compared
to [reason-threshold](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-threshold) to determine [reason-pass](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-pass).

**Available in these events:** [^fail](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#fail)

**Available in these iterators:** [reason-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#reason-iterator)

**Also see these related items:** [reason-pass](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-pass), [reason-threshold](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#reason-threshold)

### user-count
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_USER_COUNT, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_USER_COUNT);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_USER_COUNT)
```
<!-- /tab -->

Enrolled user count.

The number of distinct enrolled users.

This setting is only available for [phrasespot](https://doc.sensory.com/tnl/7.8/api/setting-keys/values.md#phrasespot) models
that continuously adapt to speakers' voices.

**Available in these events:** [^adapted](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#adapted), [^new-user](https://doc.sensory.com/tnl/7.8/api/setting-keys/events.md#new-user)

**Available in these iterators:** _none_

### user-index
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_USER_INDEX, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_USER_INDEX);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_USER_INDEX)
```
<!-- /tab -->

Enrolled user index.

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

**Available in these events:** _none_

**Available in these iterators:** [user-iterator](https://doc.sensory.com/tnl/7.8/api/setting-keys/iterators.md#user-iterator)

## THF Micro DSP

### dsp.production-ready
- result
- int
- read-only

<!-- tab: c -->

**C/C++**

```c
int value;
snsrGetInt(s, SNSR_RES_EMBEDDED_MODEL_PRODUCTION_READY, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
int value = s.getInt(Snsr.RES_EMBEDDED_MODEL_PRODUCTION_READY);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_int(snsr.RES_EMBEDDED_MODEL_PRODUCTION_READY)
```
<!-- /tab -->

Whether the DSP model files are suitable for production use.

Possible values:

`0`: The [dsp-acmodel-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#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](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#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](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-header-stream) conversion is complete.

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [dsp-acmodel-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-acmodel-stream), [dsp.t-slice-version](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#dspt-slice-version)

### dsp.t-slice-version
- result
- string
- read-only

<!-- tab: c -->

**C/C++**

```c
const char * value;
snsrGetString(s, SNSR_RES_MIN_EMBEDDED_VERSION, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
String value = s.getString(Snsr.RES_MIN_EMBEDDED_VERSION);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_string(snsr.RES_MIN_EMBEDDED_VERSION)
```
<!-- /tab -->

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](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-acmodel-stream) and [dsp-search-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-search-stream) DSP data files.

**Note:**

This read-only value is valid only after
a [dsp-acmodel-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-acmodel-stream) conversion is complete.

**Available in these events:** _all_

**Available in these iterators:** _all_

**Also see these related items:** [dsp-acmodel-stream](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-acmodel-stream), [dsp.production-ready](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#dspproduction-ready), [dsp-target](https://doc.sensory.com/tnl/7.8/api/setting-keys/runtime.md#dsp-target)

## Logging & diagnostics

### profile:real-time
- result
- double
- read-only

<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_CPU_SECONDS_USED, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_CPU_SECONDS_USED);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_CPU_SECONDS_USED)
```
<!-- /tab -->

Seconds spent in model inference since last reset.

Reports the number of wall-clock seconds spent running the model,
or [template](https://doc.sensory.com/tnl/7.8/models/tpl/index.md#template-type) slot in a model.

This depends on having a usable real-time clock implementation.

**Available in these events:** _none_

**Available in these iterators:** _none_

**Also see these related items:** [profile](https://doc.sensory.com/tnl/7.8/api/inference.md#profile), [CONFIG_CLOCK_FUNC](https://doc.sensory.com/tnl/7.8/api/library-config.md#config_clock_func)

### profile:samples
- result
- double
- read-only
<!-- tab: c -->

**C/C++**

```c
double value;
snsrGetDouble(s, SNSR_RES_SAMPLES_PROCESSED, &value);
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
double value = s.getDouble(Snsr.RES_SAMPLES_PROCESSED);
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
value = s.get_double(snsr.RES_SAMPLES_PROCESSED)
```
<!-- /tab -->

Number of samples processed since last reset.

Reports the number of audio samples processed while running a model,
or [template](https://doc.sensory.com/tnl/7.8/models/tpl/index.md#template-type) slot in a model. When used without a slot
prefix `profile:samples` returns the same value as [sample-count](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#sample-count).

**Available in these events:** _none_

**Available in these iterators:** _none_

**Also see these related items:** [profile](https://doc.sensory.com/tnl/7.8/api/inference.md#profile), [profile:real-time](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#profilereal-time), [sample-count](https://doc.sensory.com/tnl/7.8/api/setting-keys/results.md#sample-count)

<!-- Reference definitions from includes/links.md -->
[THF Micro]: https://doc.sensory.com/thf-micro/ "THF Micro documentation"

<!-- Abbreviation definitions from includes/abbreviations.md -->
*[API]: Application Programming Interface
*[LVCSR]: Large Vocabulary Continuous Speech Recognition model, feed-forward neural net acoustic model with FST decoder
*[NLU]: Natural Language Understanding model
*[SDK]: Software Development Kit
*[SLM]: Generative Small Language Model
*[STT]: Speech To Text: transformers with language model and CTC decoding
*[THF]: TrulyHandsfree, Sensory's wake word and command recognition technology
*[TNL]: TrulyNatural, Sensory's large-vocabulary speech recognition technology
*[VAD]: Voice Activity Detector
