Skip to content

simutils: speech

Bryce George edited this page May 15, 2021 · 2 revisions

Author: ancient-sentinel - Last Updated: 5/6/2021

speech Module

A module which provides helper classes for utilizing the NAO speech APIs.

Classes

class QiState(Enum):

See qiChat syntaxes and qiChatBuilder

 

class QiChatBuilder:

See qiChat syntaxes and qiChatBuilder

 

class SpeechEvent:

This class represents a speech event which invokes a callback when a particular phrase is recognized.

  • is_subscribed() -> bool - A method which returns a value indicating whether the speech event is subscribed. Returns True if the event is registered, otherwise False.

  • register(speech_service: SIMSpeech) -> bool - A method which registers the speech event with the provided speech service. It returns True if the registration was successful, otherwise False.

  • unregister() -> bool - A method which unregisters the speech event from the speech service it is subscribed to. It returns True if the event was unregistered successfully, otherwise False.

  • wait(timeout: float) -> qi.FutureState - A method which waits for the speech event to occur. if a timeout is specified, the event subscription will be canceled after that period if it has not already occurred.

 

class SpeechEventException(Exception)

A class which represents an exception raised due to a speech event error.

  • message: str - A property which stores the error message.

 

Clone this wiki locally