Go to the documentation of this file.
24 #include "../src/rhino_recognizer.h"
27 {
"model_path", required_argument,
NULL,
'm' },
28 {
"keyword_path", required_argument,
NULL,
'k' },
29 {
"access_key", required_argument,
NULL,
'a' },
30 {
"sensitivity", required_argument,
NULL,
's' },
71 fprintf(stderr,
"Usage : %s -m MODEL_PATH -c CONTEXT_PATH -a ACCESS_KEY [-s SENSTIVITY -r (require endpoint)]\n",
77 recognizer.
initialize(
"/tmp/picovoice_driver/test_rhino", 100.);
80 std::cout <<
"Configure with parameters " << parameters << std::endl;
87 std::this_thread::sleep_for(std::chrono::milliseconds(10));
91 std::cout <<
"Result: " << recognizer.
getResult() << std::endl;
95 std::cout <<
"--" << std::endl;
void interrupt_handler(int)
double sensitivity_
sensitivity_ Recognizer sensitivity
int main(int argc, char **argv)
void configure(const RhinoRecognizerData::Parameters ¶meters) override
bool require_endpoint_
require_endpoint_ If true, Rhino requires an endpoint (chunk of silence) before finishing inference.
static struct option long_options[]
std::string model_path_
model_path_ Path to the Picovoice model parameters
RhinoRecognizerData::Result getResult() override
getResult Get the recognition result
bool isRecognizing()
isRecognizing Whether the recognize method is running
bool is_understood_
is_understood_ Whether the recognizer understood an intent
void recognize()
recognize Recognize something from an audio input stream
std::string context_path_
context_path_ Path to the Picovoice Rhino context.rhn
std::string access_key_
access_key_ Picovoice access key
void initialize(const std::string &record_directory, double record_timeout)
initialize Initialize the recognizer