Recognizers

Recognizers are simple interfaces to speech recognition softwares

Base

class dobby.recognizers.Recognizer[source]

Bases: threading.Thread

Threaded Recognizer base class. A queue can be subscribed to the Recognizer and hence, receive recognized pyjulius.Sentence objects

subscribers

List of subscribers

publish(sentence)[source]

Publish a recognized sentence to all subscribers

Parameters:sentence (pyjulius.Sentence) – the recognized sentence

Note

The type of the sentence parameter may change in the near future when a new Recognizer will be added

stop()[source]

Stop the thread

subscribe(subscriber)[source]

Add a queue to the Recognizer’s subscribers list. A subscriber will receive published pyjulius.Sentence objects

Parameters:subscriber (Queue.Queue) – subscriber to append
unsubscribe(subscriber)[source]

Remove a queue from the subscribers list

Parameters:subscriber (Queue.Queue) – subscriber to remove

Julius

class dobby.recognizers.julius.Julius(host, port, encoding, min_score)[source]

Bases: dobby.recognizers.Recognizer

Julius Recognizer is based on Julius speech recognition engine. It uses pyjulius to connect to julius instance running in module mode

Parameters:
  • host (string) – host of the server
  • port (integer) – port of the server
  • encoding (string) – encoding used to decode server’s output
  • min_score (float) – minimum score under which the recognition result will be ignored
run()[source]

Run the recognition and publish() the recognized pyjulius.Sentence objects