STTConfig¶
Inherits: Resource < Reference < Object
Category: Core
Brief Description¶
Stores filenames and variables for Pocketsphinx speech to text.
Member Functions¶
String | get_dict_filename ( ) const |
String | get_hmm_dirname ( ) const |
String | get_kws_filename ( ) const |
int | init ( ) |
void | set_dict_filename ( String dict_filename ) |
void | set_hmm_dirname ( String hmm_dirname ) |
void | set_kws_filename ( String kws_filename ) |
Description¶
Contains filenames and variables needed for Pocketsphinx speech to text. Instances of this class supply information to STTRunner objects.
Member Function Description¶
- String get_dict_filename ( ) const
Returns the currently defined dictionary filename. If no name has been defined yet, returns an empty String (""
).
- String get_hmm_dirname ( ) const
Returns the currently defined HMM directory name. If no name has been defined yet, returns an empty String (""
).
- String get_kws_filename ( ) const
Returns the currently defined keywords filename. If no name has been defined yet, returns an empty String (""
).
- int init ( )
Initializes Pocketsphinx speech to text variables. The attributes for HMM directory name, dictionary filename and keywords filename must have been previously defined with the appropriate setters (set_hmm_dirname, set_dict_filename and set_kws_filename).
Returns one of the following STTError values:
OK
UNDEF_FILES_ERR
USER_DIR_MAKE_ERR
USER_DIR_COPY_ERR
MULTIBYTE_STR_ERR
MEMALLOC_ERR
CONFIG_CREATE_ERR
REC_CREATE_ERR
DECODER_CREATE_ERR
- void set_dict_filename ( String dict_filename )
Sets the dictionary filename as the specified value if the file exists.
- void set_hmm_dirname ( String hmm_dirname )
Sets the HMM directory name as the specified value if the directory exists.
- void set_kws_filename ( String kws_filename )
Sets the keywords filename as the specified value if the file exists.