Skip to content

Commit b08fa83

Browse files
committed
Amend recently added documentation on new engines
Re: dictation-toolbox#139, dictation-toolbox#376, dictation-toolbox#383. I've added a section on new engines back into the CONTRIBUTING.rst file and given criteria for new engine implementations.
1 parent d0d4e44 commit b08fa83

File tree

2 files changed

+59
-29
lines changed

2 files changed

+59
-29
lines changed

CONTRIBUTING.rst

+52
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _RefContributing:
2+
13
Contributing
24
============
35

@@ -76,6 +78,56 @@ Other languages such as German and Dutch only have mappings for using
7678
``IntegerRef`` (and similar) elements.
7779

7880

81+
.. _RefContributingNewEngines:
82+
83+
Contributing New Speech Recognition Engines
84+
-------------------------------------------
85+
86+
Introduction and Criteria
87+
~~~~~~~~~~~~~~~~~~~~~~~~~
88+
89+
Contribution of new Dragonfly speech recognition engine implementations is
90+
welcome, provided certain criteria are met. New implementations must:
91+
92+
* be as functional as the current engines
93+
* have some significant advantage over the current engines, perhaps in
94+
terms of accuracy, speed, CPU/memory requirements and/or platform support
95+
* have a willing maintainer or require little maintenance
96+
97+
Before setting out to implement a new Dragonfly engine, please know that
98+
it is difficult to achieve the first criterion on functionality.
99+
Dragonfly's feature set requires a very specific type of speech recognition
100+
engine. Namely, it must be one which supports each of the following
101+
features:
102+
103+
1. definition of voice commands in a grammar format
104+
2. efficient and dynamic activation and deactivation of (parts of) grammars
105+
at the beginning of an utterance
106+
3. in-speech transition between dictated prose (dictation mode), loaded
107+
voice commands (command mode) and vice versa
108+
109+
Each Dragonfly engine supports features one and two. All engines support
110+
feature three except the CMU Pocket Sphinx engine. However, Sphinx is
111+
only limited in that dictated prose must be spoken in separate utterances.
112+
113+
These three requirements have effectively ruled out Dragonfly support for
114+
most speech recognition engines that users have asked about in the past.
115+
This is not meant to discourage those wishing to contribute new
116+
implementations, it is simply a fact.
117+
118+
As for the second and third criteria listed above, they are fairly
119+
self-explanatory. There is no sense in contributing a new engine that
120+
brings nothing new to the table and this library's maintainer does not wish
121+
to substantially increase the effort needed to keep things working.
122+
123+
.. _RefContributingNewEngineGuide:
124+
125+
New SR Engine Guide
126+
~~~~~~~~~~~~~~~~~~~
127+
128+
TODO
129+
130+
79131
.. Links.
80132
.. _Read the docs: https://readthedocs.org/
81133
.. _Sphinx documentation engine: https://www.sphinx-doc.org/en/master/

documentation/faq.txt

+7-29
Original file line numberDiff line numberDiff line change
@@ -165,31 +165,10 @@ the following resources from might be of use:
165165
Will Dragonfly add support for speech recognition engine X?
166166
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167167

168-
We are not considering the addition of new Dragonfly engine implementations.
169-
The main reason for this is that Dragonfly requires a very specific type of
170-
speech recognition engine to work. It must be one which supports each of
171-
the following features:
172-
173-
1. definition of voice commands in a grammar format
174-
2. efficient and dynamic activation and deactivation of (parts of) grammars
175-
at the beginning of an utterance
176-
3. in-speech transition between dictated prose (dictation mode), loaded
177-
voice commands (command mode) and vice versa
178-
179-
Each Dragonfly engine supports features one and two. All engines support
180-
feature three except the CMU Pocket Sphinx engine. However, Sphinx is
181-
only limited in that dictated prose must be spoken in separate utterances.
182-
183-
These three requirements have effectively ruled out Dragonfly support for
184-
most speech recognition engines that users have asked about in the past.
185-
186-
Even if a new speech recognition engine comes along that supports the above
187-
features, we will probably not accept an engine implementation for it
188-
because Dragonfly already has very good engine implementations.
189-
190-
We may make an exception for new implementations meant to replace current,
191-
deprecated ones. However, none of Dragonfly's current engines really need
192-
replacing.
168+
The answer is 'it depends.' No new engine implementations are currently
169+
under development. Contribution of new implementations is welcome, provided
170+
certain criteria are met. Please see :ref:`RefContributingNewEngines` for
171+
more information.
193172

194173

195174
API Questions
@@ -373,12 +352,11 @@ prints the name of the current engine if one has been initialized:
373352
print("No engine has been initialized.")
374353

375354

376-
Can I implement my own custom Dragonfly engine?
355+
Can I implement my own custom Dragonfly engine externally?
377356
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378357

379-
Yes, this is possible. Although Dragonfly is :ref:`not accepting new engine
380-
implementations <RefFAQSupportEngineX>`, you can write one externally,
381-
register it and use it like any of the in-package engines.
358+
Yes, you can write a Dragonfly engine implementation externally and use it
359+
like any of the in-package engines.
382360

383361
Implementing a custom Dragonfly engine is a complex task. It is
384362
recommended that you start with a copy of the text-input engine source code

0 commit comments

Comments
 (0)