Library information¶
These keys return information about the library. They require a valid Session but are available before loading a task model.
Read information keys with the Session get function that matches the type of the setting. For example, use getString to retrieve the string value of oss-components.
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, plus value, stream, on_event, or on_item for the operand) to your code. Each example assumes the language's standard prelude:
#include <snsr.h>
import com.sensory.speech.snsr.Snsr;
import com.sensory.speech.snsr.SnsrSession;
import snsr
For the full Session lifecycle (snsrNew, new SnsrSession(), snsr.Session(...)) see Your first program.
accel-info¶
information string read-only
const char * value;
snsrGetString(s, SNSR_ACCELERATION, &value);
String value = s.getString(Snsr.ACCELERATION);
value = s.get_string(snsr.ACCELERATION)
Type of acceleration used.
Returns text describing the type of vector acceleration the library uses.
library-info¶
information string read-only
const char * value;
snsrGetString(s, SNSR_LIBRARY_INFO, &value);
String value = s.getString(Snsr.LIBRARY_INFO);
value = s.get_string(snsr.LIBRARY_INFO)
SDK library information.
Human-readable summary of NAME, VERSION, VERSION_DSP, accel-info, license-exp-message, license-exp-warn, stt-support, thread-support, LICENSE_SUPPORT, and oss-components.
license-exp-date¶
information double read-only
double value;
snsrGetDouble(s, SNSR_LICENSE_EXPDATE, &value);
double value = s.getDouble(Snsr.LICENSE_EXPDATE);
value = s.get_double(snsr.LICENSE_EXPDATE)
Library license expiration date.
Returns the license expiration date of the TrulyNatural library in seconds since the epoch. For production keys, which do not expire, the expiration date is 0.
license-exp-message¶
information string read-only
const char * value;
snsrGetString(s, SNSR_LICENSE_EXPIRES, &value);
String value = s.getString(Snsr.LICENSE_EXPIRES);
value = s.get_string(snsr.LICENSE_EXPIRES)
Library license expiration message.
The returned string is of the form "Library license expires on <date>", or NULL for license keys that do not expire.
license-exp-warn¶
information string read-only
const char * value;
snsrGetString(s, SNSR_LICENSE_WARNING, &value);
String value = s.getString(Snsr.LICENSE_WARNING);
value = s.get_string(snsr.LICENSE_WARNING)
Library license expiration warning message.
This value is NULL for library license keys that do not expire, or if the expiration date is more than 60 days into the future. For license keys expiring in 60 days or fewer, the returned string will be of the form "License will expire in 37 days.".
oss-components¶
information string read-only
const char * value;
snsrGetString(s, SNSR_OSS_COMPONENTS, &value);
String value = s.getString(Snsr.OSS_COMPONENTS);
value = s.get_string(snsr.OSS_COMPONENTS)
Open Source library acknowledgements.
List of Open Source third-party modules linked into the binary.
The returned string lists one module per newline-separated line. Each line contains the name of the library, the license type and a URL to the module license text, separated by tab characters. The TrulyNatural SDK uses permissive software licenses only.
If the binary uses no Open Source modules, the returned string is NULL.
stt-support¶
information int read-only 7.5.0
int value;
snsrGetInt(s, SNSR_STT_SUPPORT, &value);
int value = s.getInt(Snsr.STT_SUPPORT);
value = s.get_int(snsr.STT_SUPPORT)
Library Speech-To-Text support.
Returns 1 if the TrulyNatural SDK supports STT models, or 0if STT support is not available.
This is functionally equivalent to calling config with CONFIG_STT_SUPPORT, but is available across all API language bindings.
thread-support¶
information int read-only 7.5.0
int value;
snsrGetInt(s, SNSR_THREAD_SUPPORT, &value);
int value = s.getInt(Snsr.THREAD_SUPPORT);
value = s.get_int(snsr.THREAD_SUPPORT)
Library multithreading support.
Returns 1 if the TrulyNatural SDK supports running multi-threaded models, or 0 if thread support is not available.
This is functionally equivalent to calling config with CONFIG_THREAD_SUPPORT, but is available across all API language bindings.