---
source_path: "api/constants.md"
canonical_url: "https://doc.sensory.com/tnl/7.8/api/constants/"
---

# Constants

These are preprocessor macros or module constants available during the application build phase.
They contain library information such as the SDK variant and version.

Optional build-time configuration macros you define yourself (for example
`-DSNSR_USE_SUBSET`) are documented separately on [Compile-time macros](https://doc.sensory.com/tnl/7.8/api/compile-macros.md#compile-time-macros).

Each constant is spelled `SNSR_FOO` in C, `Snsr.FOO` in Java, and
`snsr.FOO` in Python (`FOO` being the heading on this page). The
example below threads `SNSR_NAME` and `SNSR_VERSION` through one
program in each binding.

**Example:**

<!-- tab: c -->

**C/C++**

```c
#include <snsr.h>

int main(int argc, char *argv[])
{
  SnsrRC r;
  printf("This is %s SDK version %s\n", SNSR_NAME, SNSR_VERSION);
  return 0;
}
```
<!-- /tab -->

<!-- tab: java -->

**Java**

```java
import com.sensory.speech.snsr.Snsr;

public class segmentSpottedAudio {
  public static void main(String[] args) {
    System.out.println("This is " + Snsr.NAME + " SDK version " + Snsr.VERSION);
  }
}
```
<!-- /tab -->

<!-- tab: py -->

**Python**

```python
import snsr

print(f"This is {snsr.NAME} SDK version {snsr.VERSION}")
```
<!-- /tab -->

## Variant

Constants in this section describe the SDK library type:
_TrulyHandsfree_ (fixed and enrolled wake words) or
_TrulyNatural_ (_TrulyHandsfree_ with LVCSR and STT).

### IS_TRULYHANDSFREE
`1` if this SDK is TrulyHandsfree, `0` if not.

### IS_TRULYNATURAL
`1` if this SDK is TrulyNatural, `0` if not.

### NAME
SDK variant: `"TrulyHandsfree"` or `"TrulyNatural"`.

### SETTING_SZ
The longest supported setting key length in bytes.

This including the terminating `\0`.

## Version

These describe the TrulyNatural SDK API version and the
[component parts][semver] of the version string.

The Python wheel metadata uses the [PEP 440][] spelling documented in
[Integrate with your build § Python](https://doc.sensory.com/tnl/7.8/api/build-system.md#build-python), for example
`7.9.0a0`. The module constant `snsr.VERSION` uses the same raw
SDK version string as the C `SNSR_VERSION` macro, for example
`7.9.0-pre.0`.

### VERSION
API version.

This follows [semantic versioning][semver] rules.

### VERSION_MAJOR
API major version number.

Incremented for changes that are **not** backwards-compatible, but also
to indicate major improvements in technology that **are** backwards-compatible.

Refer to the [release notes](https://doc.sensory.com/tnl/7.8/changes/index.md#v7-changes) for details.

### VERSION_MINOR
API minor version number.

Incremented for changes and improvements that are backwards-compatible.

### VERSION_PATCH
API patch version number.

Incremented for bug fixes.

### VERSION_PRE
Pre-release version tag.

This is empty for official releases.

### VERSION_BUILD
Build information.

This is empty for official releases.

### VERSION_CMAKE
API version compatible with [CMAKE_PROJECT_VERSION][].

[CMAKE_PROJECT_VERSION]: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_VERSION.html

### VERSION_ID
Unique release counter.

This value is incremented with each public SDK release.

### VERSION_DSP
DSP embedded library version.

<!-- Reference definitions from includes/links.md -->
[PEP 440]: https://packaging.python.org/en/latest/specifications/version-specifiers/ "Python version identification and dependency specification"
[semver]: http://semver.org/ "Semantic versioning specification"

<!-- 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
*[SDK]: Software Development Kit
*[STT]: Speech To Text: transformers with language model and CTC decoding
*[TNL]: TrulyNatural, Sensory's large-vocabulary speech recognition technology
