AlexaClientSDK
1.24.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <SnowboyWrapper.h>
Public Member Functions | |
SnowboyWrapper (const char *resourceFilename, const char *model) | |
~SnowboyWrapper ()=default | |
int | RunDetection (const int16_t *const data, const int arrayLength, bool isEnd=false) |
void | SetSensitivity (const char *sensitivity) |
void | SetAudioGain (const float audioGain) |
void | ApplyFrontend (const bool applyFrontend) |
int | SampleRate () const |
int | NumChannels () const |
int | BitsPerSample () const |
The wrapper class for snowboy::SnowboyDetect class.
Since the original API exposes std::string which will be ABI incompatible with GCC 5.1, this class replace them with const char*.
We keep the actual instantiation in void* pointer in this header, to prevent from other files to include snowboy-detect.h file.
Thanks to the community for the original idea: https://github.com/Kitt-AI/snowboy/issues/99
alexaClientSDK::kwd::SnowboyWrapper::SnowboyWrapper | ( | const char * | resourceFilename, |
const char * | model | ||
) |
Call snowboy::SnowboyDetect::SnowboyDetect constructor
resourceFilename | for the first argument of the original API call. |
model | for the second argument of the original API call. |
|
default |
Destructor
void alexaClientSDK::kwd::SnowboyWrapper::ApplyFrontend | ( | const bool | applyFrontend | ) |
Call snowboy::SnowboyDetect::ApplyFrontend
applyFrontend | for the first argument of the original API call. |
int alexaClientSDK::kwd::SnowboyWrapper::BitsPerSample | ( | ) | const |
Call snowboy::SnowboyDetect::BitsPerSample
int alexaClientSDK::kwd::SnowboyWrapper::NumChannels | ( | ) | const |
Call snowboy::SnowboyDetect::NumChannels
int alexaClientSDK::kwd::SnowboyWrapper::RunDetection | ( | const int16_t *const | data, |
const int | arrayLength, | ||
bool | isEnd = false |
||
) |
Call snowboy::SnowboyDetect::RunDetection
data | for the first argument of the original API call. |
arrayLength | for the second argument of the original API call. |
isEnd | for the third argument of the original API call. |
int alexaClientSDK::kwd::SnowboyWrapper::SampleRate | ( | ) | const |
Call snowboy::SnowboyDetect::SampleRate
void alexaClientSDK::kwd::SnowboyWrapper::SetAudioGain | ( | const float | audioGain | ) |
Call snowboy::SnowboyDetect::SetAudioGain
audioGain | for the first argument of the original API call. |
void alexaClientSDK::kwd::SnowboyWrapper::SetSensitivity | ( | const char * | sensitivity | ) |
Call snowboy::SnowboyDetect::SetSensitivity
sensitivity | for the first argument of the original API call. |
AlexaClientSDK 1.24.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0