[Development] RFC: Speech Recognition API
Tuomas Tuononen
tuomas.tuononen at code-q.fi
Thu Sep 10 15:18:04 CEST 2015
Hi all,
We are developing a new QtSpeechRecognition API for Qt.
The initial stage of development starts to be ready and we would like to
get feedback from the Qt development list experts.
You can find the sources in review in qtspeech project, branch
wip/speech-recognition:
https://codereview.qt-project.org/#/q/project:qt/qtspeech+branch:wip/speech-recognition,n,z
The initial implementation was already merged into
wip/speech-recognition, but is still open for discussion.
Main features:
- Speech recognition engines are loaded as plug-ins.
- Engine is controlled asynchronously, causing only minimal load to the
application thread.
- Built-in task queue makes plug-in development easier and forces
unified behavior between engine integrations.
- Engine integration handles the audio recording, making it easy to use
from the application.
- Application can create multiple grammars and switch between them.
- Setting mute temporarily disables speech recognition, allowing
co-operation with audio output (speech prompts or audio cues).
- Includes integration to PocketSphinx engine (latest codebase) as a
reference.
Current limitations:
- The recognition control only supports manual start/stop of audio
recording.
- Only supports reading the grammars and dictionaries from files.
- The grammar and dictionary formats are engine-specific.
- Only transcription of what was said is returned (locale-specific).
- Switching the grammar always aborts current session.
Other notes:
- QML API probably needs improvement, as I'm not an expert in that area.
Maybe an extra QML plug-in layer?
Future development:
1) Support for automatic endpointing (auto-stop) and continuously
listening grammars.
2) Engine-independent run-time grammar API (support for updating the
whole grammar or only part of the grammar).
3) Support for adding words to the dictionary run-time (probably with
engine-specific phonetic data).
4) Support for switching the grammar without interrupting audio
recording (e.g. switching from wake-up grammar to command grammar).
5) Engine-independent grammar file format.
6) Support for locale-independent results (grammar meta-data).
Best Regards,
Tuomas Tuononen,
Senior Software Engineer,
Code-Q Oy
More information about the Development
mailing list