voskSpeechRecognition
module use Vosk Speech Recognition API
in python
. This module performs speech recognition using Kaldi
speech recognition backend and converts to text. Also use YARP
to send text detection by network. Also admits YARP
source audio like input. This module also publish recognition results in YARP
port. voskSpeechRecognition
require models to perform the module. Some pre-trained models in english, spanish, chinese, russian, french, german, portuguese, greek, turkish, vietnamese are available in vosk models.
Documentation available on docs.
voskSpeechRecognition
requires audio like input.voskSpeechRecognition
models should be located in voskSpeechRecognition/models/model-x
, being x
your selected language. Download vosk models and extract content in your model-x
dir. Also configure language.ini with your x
selected language.
The process to running the program:
- Execute programs/voskSpeechRecognition.py, to start de program.
python3 speechRecognition.py
- Connect recognition source.
yarp connect /voskSpeechRecognition/data:o /yourport/data:i
NOTE:
- Data results are published on
/voskSpeechRecognition/data:o
To configure speech recognition language model, language table is attached:
Language table:
Table 1. Language table
Language | x |
---|---|
Spanish | es |
English | en |
Chinese | cn |
Russian | ru |
French | fr |
German | de |
Portuguese | pt |
Greek | gr |
Turkish | tr |
Vietnmaese | vn |
voskSpeechRecognition
requires:
- Install YARP 2.3.XX+
- Install pip
- Install vosk:
pip3 install vosk
Possible errors:
vosk
python
version requirements:
vosk
requirepython 3.8+
to be used inWindows
.vosk
requirepython 3.5+
to be used inLinux
.vosk
requirepython 3.8+
to be used inMac OS X
.vosk
requirepython 3.7+
to be used inRaspbian
. (Raspberry
also require to download and install.whl
manually.vosk
Raspberry
version here
Tested on: windows 10
, ubuntu 14.04
, ubuntu 16.04
, ubuntu 18.04
, lubuntu 18.04
and raspbian
.