NAOqi Audio - Overview | API | Tutorial
Namespace : AL
#include <alproxies/alspeechrecognitionproxy.h>
As any module, this module inherits methods from ALModule API. It also has the following specific methods:
Returns the list of the languages currently installed on the system.
Example: [‘French’, ‘Chinese’, ‘English’, ‘German’, ‘Italian’, ‘Japanese’, ‘Korean’, ‘Portuguese’, ‘Spanish’]
Returns: | List of installed languages (language names are given in English) |
---|
Returns the language currently used by the speech recognition system.
Example: ‘French’
Could be one of the available languages.
For further details, see: ALSpeechRecognitionProxy::getAvailableLanguages().
Returns: | Current language used by the speech recognition engine |
---|
Sets the language currently used by the speech recognition system. Each NAOqi restart will however reset that setting to the default language that can be set on NAO’s web page.
Parameters: |
|
---|
Gets a parameter of the speech recognition engine.
Parameters: |
|
---|---|
Returns: | Value of the parameter |
Sets parameters of the speech recognition engine.
Parameters: |
|
---|
Supported parameters: - Sensitivity: Value between 0 and 1 setting the sensitivity of the voice activity detector used by the engine. - NbHypotheses: Number of hypotheses returned by the engine. Default: 1
Deprecated since version 1.20: use ALSpeechRecognitionProxy::setVocabulary() instead.
Loads the vocabulary to recognize contained in a .lcf or .fcf file (NUANCE grammar file format).
Parameters: |
|
---|
Gets value of the parameter AudioExpression. This parameter indicates if the recognition process will play “bip” or not.
When set to True, a “bip” is played at the beginning of the recognition process, and another “bip” is played at the end of the process. This is a useful indication to let the user know when it is appropriate to speak.
Parameters: |
|
---|
Enables or disables the leds animations showing the state of the recognition engine during the recognition process.
Parameters: |
|
---|
Sets the list of words/phrases (vocabulary) that should be recognized by the speech recognition engine. If word spotting is disabled (default), the engine expects to hear one of the specified words, nothing more, nothing less. If enabled, the specified words can be pronounced in the middle of a whole speech stream, the engine will try to spot them. The parameter enableWordSpotting changes the results given by the speech recognition. Please refer to ALSpeechRecognition for details.
Parameters: |
|
---|
Deprecated since version 1.20: use ALSpeechRecognitionProxy::setVocabulary() instead.
Sets the list of words/phrases (vocabulary) that should be recognized by the speech recognition engine. To enable “word spotting”, please use ALSpeechRecognitionProxy::setVocabulary() instead.
Parameters: |
|
---|
Converts a BNF file to a LCF file. The LCF file is a binary file which contains the same content as the BNF file. Use this file for the method addContext.
Parameters: |
|
---|
Adds the context contained in the LCF file. This LCF file contains the set of rules that should be recognized by the speech recognition engine.
Parameters: |
|
---|
Removes one context from the speech recognition engine.
Parameters: |
|
---|
Removes all contexts from the speech recognition engine.
Saves the current context set under the name saveName.
Saved context sets are lost when restarting NaoQi.
Replaces the currently loaded context set by the one previously saved under the name saveName.
Note: reloading a saved context do not reset its state; i.e. changes made since the save, to its activated rules or slots, are not erased.
Erases the save named saveName. This will not remove any currently loaded contexts.
Activates a rule contained in the specified context.
Parameters: |
|
---|
Deactivates a rule contained in the specified context.
Parameters: |
|
---|
Activates all rules contained in the specified context.
Parameters: |
|
---|
Deactivates all rules contained in the specified context.
Parameters: |
|
---|
Adds a list of words in a slot. A slot is a part of a context which can be modified. You can add a list of words that should be recognized by the speech recognition engine.
Parameters: |
|
---|
Removes all words from a slot.
Parameters: |
|
---|
Gets rules corresponding to the specified type. Type can be:
Parameters: |
|
---|
Stops and restarts the speech recognition engine according to the input parameter. This can be used to add contexts, activate or deactivate rules of a contex, add a words to a slot.
Parameters: |
|
---|
Subscribes to ALSpeechRecognition. This causes the module to start writing information to ALMemory in “WordRecognized”. This can be accessed in ALMemory using ALMemoryProxy::getData().
Parameters: |
|
---|
Unsubscribes to ALSpeechRecognition. This causes the module to stop writing information to ALMemory in “WordRecognized”.
Parameters: |
|
---|
Raised when one of the specified words with ALSpeechRecognitionProxy::setVocabulary() has been recognized. When no word is currently recognized, this value is reinitialized.
Parameters: |
|
---|
Raised when the engine produces a result. Same as WordRecognized with an additional information, the name of the grammar used for the recognition.
Parameters: |
|
---|
Deprecated since version 1.20.
Raised when one of the specified words with ALSpeechRecognitionProxy::setWordListAsVocabulary() has been recognized. This value is kept unchanged until a new word has been recognized.
Parameters: |
|
---|
Raised when the automatic speech recognition engine has detected a voice activity.
Parameters: |
|
---|
Raised when the speech recognition engine is started.
Parameters: |
|
---|
Raised when the status of the speech recognition engine changes.
Parameters: |
|
---|
Experimental
Raised with true value when the engine is not only listening but also ready to process data (i.e. not raised when the ASR engine is only recording sound to be processed).
Parameters: |
|
---|