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.
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
#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;
}
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);
}
}
import snsr
print(f"This is {snsr.NAME} SDK version {snsr.VERSION}")
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 of the version string.
The Python wheel metadata uses the PEP 440 spelling documented in Integrate with your build ยง Python, for example 7.8.0a2. The module constant snsr.VERSION uses the same raw SDK version string as the C SNSR_VERSION macro, for example 7.8.0-pre.2.
VERSION¶
API version.
This follows semantic versioning 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 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.
VERSION_ID¶
Unique release counter.
This value is incremented with each public SDK release.
VERSION_DSP¶
DSP embedded library version.