Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
picovoice_driver::Recognizer Class Referenceabstract

The Recognizer class used for recognizing something out of audio data. More...

#include <recognizer.h>

Inheritance diagram for picovoice_driver::Recognizer:
Inheritance graph
[legend]

Classes

struct  RecordSettings
 

Public Member Functions

void initialize (const std::string &record_directory, double record_timeout)
 initialize Initialize the recognizer More...
 
bool isPreempting ()
 isPreempting Whether a preempt was requested More...
 
bool isRecognizing ()
 isRecognizing Whether the recognize method is running More...
 
void preempt ()
 preempt Preempt the recognition More...
 
void recognize ()
 recognize Recognize something from an audio input stream More...
 

Protected Member Functions

virtual RecordSettings getRecordSettings ()=0
 
virtual void recognizeInit ()=0
 
virtual bool recognizeProcess (int16_t *frames)=0
 
void recognizeThread ()
 
void recognizeThreadCatchException ()
 

Protected Attributes

std::shared_ptr< std::thread > recognize_thread_
 
std::string recognize_thread_exception_string_
 

Private Attributes

bool initialized_ = false
 
std::atomic< bool > is_recognizing_ = ATOMIC_VAR_INIT(false)
 
std::atomic< bool > preempt_requested_ = ATOMIC_VAR_INIT(false)
 
std::string record_directory_
 
double record_timeout_
 

Detailed Description

The Recognizer class used for recognizing something out of audio data.

Definition at line 45 of file recognizer.h.

Member Function Documentation

◆ getRecordSettings()

virtual RecordSettings picovoice_driver::Recognizer::getRecordSettings ( )
protectedpure virtual

◆ initialize()

void picovoice_driver::Recognizer::initialize ( const std::string &  record_directory,
double  record_timeout 
)

initialize Initialize the recognizer

Parameters
record_directoryRecord directory
record_timeoutTimeout for recording when doing a recognize request

Definition at line 157 of file recognizer.cpp.

◆ isPreempting()

bool picovoice_driver::Recognizer::isPreempting ( )

isPreempting Whether a preempt was requested

Definition at line 190 of file recognizer.cpp.

◆ isRecognizing()

bool picovoice_driver::Recognizer::isRecognizing ( )

isRecognizing Whether the recognize method is running

Returns
True if recognizing, False otherwise

Definition at line 199 of file recognizer.cpp.

◆ preempt()

void picovoice_driver::Recognizer::preempt ( )

preempt Preempt the recognition

Definition at line 181 of file recognizer.cpp.

◆ recognize()

void picovoice_driver::Recognizer::recognize ( )

recognize Recognize something from an audio input stream

Definition at line 164 of file recognizer.cpp.

◆ recognizeInit()

virtual void picovoice_driver::Recognizer::recognizeInit ( )
protectedpure virtual

◆ recognizeProcess()

virtual bool picovoice_driver::Recognizer::recognizeProcess ( int16_t *  frames)
protectedpure virtual

◆ recognizeThread()

void picovoice_driver::Recognizer::recognizeThread ( )
protected

Definition at line 59 of file recognizer.cpp.

◆ recognizeThreadCatchException()

void picovoice_driver::Recognizer::recognizeThreadCatchException ( )
protected

Definition at line 145 of file recognizer.cpp.

Member Data Documentation

◆ initialized_

bool picovoice_driver::Recognizer::initialized_ = false
private

Definition at line 94 of file recognizer.h.

◆ is_recognizing_

std::atomic<bool> picovoice_driver::Recognizer::is_recognizing_ = ATOMIC_VAR_INIT(false)
private

Definition at line 97 of file recognizer.h.

◆ preempt_requested_

std::atomic<bool> picovoice_driver::Recognizer::preempt_requested_ = ATOMIC_VAR_INIT(false)
private

Definition at line 96 of file recognizer.h.

◆ recognize_thread_

std::shared_ptr<std::thread> picovoice_driver::Recognizer::recognize_thread_
protected

Definition at line 84 of file recognizer.h.

◆ recognize_thread_exception_string_

std::string picovoice_driver::Recognizer::recognize_thread_exception_string_
protected

Definition at line 83 of file recognizer.h.

◆ record_directory_

std::string picovoice_driver::Recognizer::record_directory_
private

Definition at line 92 of file recognizer.h.

◆ record_timeout_

double picovoice_driver::Recognizer::record_timeout_
private

Definition at line 93 of file recognizer.h.


The documentation for this class was generated from the following files:


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:20