.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_STTConfig: STTConfig ========= **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Stores filenames and variables for *Pocketsphinx* speech to text. Member Functions ---------------- +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_dict_filename` **(** **)** const | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_hmm_dirname` **(** **)** const | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_kws_filename` **(** **)** const | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`init` **(** **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_dict_filename` **(** :ref:`String` dict_filename **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_hmm_dirname` **(** :ref:`String` hmm_dirname **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_kws_filename` **(** :ref:`String` kws_filename **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------+ Description ----------- Contains filenames and variables needed for *Pocketsphinx* speech to text. Instances of this class supply information to :ref:`STTRunner` objects. Member Function Description --------------------------- .. _class_STTConfig_get_dict_filename: - :ref:`String` **get_dict_filename** **(** **)** const Returns the currently defined dictionary filename. If no name has been defined yet, returns an empty :ref:`String` (``""``). .. _class_STTConfig_get_hmm_dirname: - :ref:`String` **get_hmm_dirname** **(** **)** const Returns the currently defined HMM directory name. If no name has been defined yet, returns an empty :ref:`String` (``""``). .. _class_STTConfig_get_kws_filename: - :ref:`String` **get_kws_filename** **(** **)** const Returns the currently defined keywords filename. If no name has been defined yet, returns an empty :ref:`String` (``""``). .. _class_STTConfig_init: - :ref:`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 (:ref:`set_hmm_dirname`, :ref:`set_dict_filename` and :ref:`set_kws_filename`). Returns one of the following :ref:`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`` .. _class_STTConfig_set_dict_filename: - void **set_dict_filename** **(** :ref:`String` dict_filename **)** Sets the dictionary filename as the specified value if the file exists. .. _class_STTConfig_set_hmm_dirname: - void **set_hmm_dirname** **(** :ref:`String` hmm_dirname **)** Sets the HMM directory name as the specified value if the directory exists. .. _class_STTConfig_set_kws_filename: - void **set_kws_filename** **(** :ref:`String` kws_filename **)** Sets the keywords filename as the specified value if the file exists.