PocketSphinx
5.0.0
A small speech recognizer
|
Search modules. More...
Go to the source code of this file.
Typedefs | |
typedef struct ps_search_iter_s | ps_search_iter_t |
typedef struct ps_decoder_s | ps_decoder_t |
Search modules.
User can configure several "search" objects with different grammars and language models and switch them in runtime to provide interactive experience for the user.
There are different possible search modes:
Each search module has a name and can be referenced by name. These names are application-specific. The function ps_activate_search() activates a search module previously added by a name. Only one search module can be activated at time.
To add the search module one needs to point to the grammar/language model describing the search. The location of the grammar is specific to the application.
The exact design of a searches depends on your application. For example, you might want to listen for activation keyphrase first and once keyphrase is recognized switch to ngram search to recognize actual command. Once you have recognized the command, you can switch to grammar search to recognize the confirmation and then switch back to keyphrase listening mode to wait for another command.
If only a simple recognition is required it is sufficient to add a single search or just configure the required mode with configuration options.
Because Doxygen is Bad Software, the actual function definitions can only exist in ps_decoder_t. Sorry about that.