NUGU SDK Linux  1.7.5
wakeup_interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 SK Telecom Co., Ltd. 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  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __NUGU_WAKEUP_INTERFACE_H__
18 #define __NUGU_WAKEUP_INTERFACE_H__
19 
20 #include <string>
21 
22 namespace NuguClientKit {
23 
38 enum class WakeupDetectState {
39  WAKEUP_IDLE,
43 };
44 
49 typedef struct _WakeupModelFile {
50  std::string net;
51  std::string search;
53 
59 public:
60  virtual ~IWakeupListener() = default;
61 
69  virtual void onWakeupState(WakeupDetectState state, float power_noise, float power_speech) = 0;
70 };
71 
77 public:
78  virtual ~IWakeupHandler() = default;
79 
85  virtual void setListener(IWakeupListener* listener) = 0;
86 
91  virtual bool startWakeup() = 0;
92 
96  virtual void stopWakeup() = 0;
97 
102  virtual void changeModel(const WakeupModelFile& model_file) = 0;
103 };
104 
109 } // NuguClientKit
110 
111 #endif /* __NUGU_WAKEUP_INTERFACE_H__ */
Wakeup handler interface.
Definition: wakeup_interface.hh:76
virtual void stopWakeup()=0
Stop the wakeup detection.
virtual void changeModel(const WakeupModelFile &model_file)=0
Change wakeup word model.
virtual void setListener(IWakeupListener *listener)=0
Set the Listener object.
virtual bool startWakeup()=0
Start the wakeup detection.
Wakeup listener interface.
Definition: wakeup_interface.hh:58
virtual void onWakeupState(WakeupDetectState state, float power_noise, float power_speech)=0
Report to the user wakeup detection state changed.
struct NuguClientKit::_WakeupModelFile WakeupModelFile
Model for holding Wakeup model file info.
WakeupDetectState
WakeupDetectState.
Definition: wakeup_interface.hh:38
Model for holding Wakeup model file info.
Definition: wakeup_interface.hh:49
std::string search
Definition: wakeup_interface.hh:51
std::string net
Definition: wakeup_interface.hh:50