Skip to content

SIMYAN: speech

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

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

SIMSpeech in speech.py

The SIMYAN speech service provides a means for subscribing to speech events and manages simultaneous subscriptions from multiple applications/subscribers with different phrase vocabularies. It pairs with the simutils.speech.SpeechEvent class to make subscription simple and easily managed.

Methods

  • subscribe(phrases: List(str), minimum_confidence: float) -> qi.Future

Creates a speech event subscription for the specified phrases. It returns a future that will be called when one of the provided phrases is recognized with at least the minimum confidence. Each phrase in the list of phrases may contain one or more words which will be recognized as a unit. The minimum confidence sets a threshold to ensure that the recognition system is suitably certain that the phrase was actually heard. When a speech event occurs, the value of the subscription future is set with a tuple containing the recognized phrase and the confidence it was recognized with.

Each subscription is for a single event and repeated recognition requires re-subscribing after an event has been triggered. This behavior is handled transparently to the user if the simutils.speech.SpeechEvent class is used for registration, though it is not strictly required in order to use this speech service. Unsubscribing is accomplished by requesting cancellation on the subscription future.

  • stop() -> qi.Void

Stops and unregisters the SIMYAN speech service.

Clone this wiki locally