Engines sub-package

Dragonfly supports multiple speech recognition engines as its backend. The engines sub-package implements the interface code for each supported engine.

EngineBase class

The dragonfly.engines.engine_base.EngineBase class forms the base class for this specific speech recognition engine classes. It defines the stubs required and performs some of the logic necessary for Dragonfly to be able to interact with a speech recognition engine.

class EngineBase

Base class for engine-specific back-ends.

is_available
Check whether this engine is available.
language
Current user language of the SR engine.
mimic(words)
Mimic a recognition of the given words.
name
The human-readable name of this engine.
speak(text)
Speak the given text using text-to-speech.

System Message: WARNING/2 (C:\data\projects\Dragonfly\work dragonfly\documentation\engines.txt, line 22)

error while formatting signature for dragonfly.engines.engine_natlink.NatlinkEngine.DictationContainer: arg is not a Python function

SAPI 5 engine class

class Sapi5Engine

Speech recognition engine back-end for SAPI 5.

activate_grammar(grammar)
Activate the given grammar.
activate_rule(rule, grammar)
Activate the given rule.
deactivate_grammar(grammar)
Deactivate the given grammar.
deactivate_rule(rule, grammar)
Deactivate the given rule.
is_available
Check whether this engine is available.
load_grammar(grammar)
Load the given grammar.
mimic(words)
Mimic a recognition of the given words.
speak(text)
Speak the given text using text-to-speech.