AlexaClientSDK  1.24.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SnowboyWrapper.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_KWD_KITTAI_INCLUDE_KITTAI_SNOWBOYWRAPPER_H_
17 #define ALEXA_CLIENT_SDK_KWD_KITTAI_INCLUDE_KITTAI_SNOWBOYWRAPPER_H_
18 
19 namespace alexaClientSDK {
20 namespace kwd {
21 
35 public:
42  SnowboyWrapper(const char* resourceFilename, const char* model);
43 
47  ~SnowboyWrapper() = default;
48 
57  int RunDetection(const int16_t* const data, const int arrayLength, bool isEnd = false);
58 
64  void SetSensitivity(const char* sensitivity);
65 
71  void SetAudioGain(const float audioGain);
72 
78  void ApplyFrontend(const bool applyFrontend);
79 
85  int SampleRate() const;
86 
92  int NumChannels() const;
93 
99  int BitsPerSample() const;
100 
101 private:
103  void* m_snowboy;
104 };
105 
106 } // namespace kwd
107 } // namespace alexaClientSDK
108 
109 #endif // ALEXA_CLIENT_SDK_KWD_KITTAI_INCLUDE_KITTAI_SNOWBOYWRAPPER_H_
void ApplyFrontend(const bool applyFrontend)
Definition: SnowboyWrapper.cpp:55
SnowboyWrapper(const char *resourceFilename, const char *model)
Definition: SnowboyWrapper.cpp:39
void SetAudioGain(const float audioGain)
Definition: SnowboyWrapper.cpp:51
int SampleRate() const
Definition: SnowboyWrapper.cpp:59
Definition: SnowboyWrapper.h:34
int RunDetection(const int16_t *const data, const int arrayLength, bool isEnd=false)
Definition: SnowboyWrapper.cpp:43
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
int NumChannels() const
Definition: SnowboyWrapper.cpp:63
void SetSensitivity(const char *sensitivity)
Definition: SnowboyWrapper.cpp:47
int BitsPerSample() const
Definition: SnowboyWrapper.cpp:67

AlexaClientSDK 1.24.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0