Vosk is an offline open source speech recognition toolkit. It enables speech recognition models for 18 languages and dialects - English, Indian English, German, French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese, Italian, Dutch, Catalan, Arabic, Greek, Farsi, Filipino, Ukrainian.
Vosk models are small (50 Mb) but provide continuous large vocabulary transcription, zero-latency response with streaming API, reconfigurable vocabulary and speaker identification.
Speech recognition bindings implemented for various programming languages like Python, Java, Node.JS, C#, C++ and others.
Vosk supplies speech recognition for chatbots, smart home appliances, virtual assistants. It can also create subtitles for movies, transcription for lectures and interviews.
Vosk scales from small devices like Raspberry Pi or Android smartphone to big clusters.
For installation instructions, examples and documentation visit Vosk Website.
-
Clone the
ETS fork
of theVosk API
repository https://github.com/EducationalTestingService/vosk-api. -
If you are using your own custom ASR model, copy the model into the
model
directory in the structure shared in the sectionModel structure
on VOSK-API website. Alternatively, you can download one of the open-source ASR models available on Vosk-API website, uncompress the downloaded zip file and, rename the containing directory tomodel
. NOTE: To be able to extract phoneme labels and timestamps, you need to include thephones.txt
file that was used during ASR model buildiong in themodel/graph
directory, so Vosk's open source models may not work out of the box. -
Add the audio file to be used to test the C test script under
c
and rename the file totest.wav
to use the script as is. -
The docker image for building Kaldi and the Python wheels is located in the cloned repository under
travis
.Build and run the docker image as follows:
docker build --file Dockerfile.manylinux --tag alphacep/kaldi-manylinux:latest . docker run -ti -v $(pwd)/..:/io alphacep/kaldi-manylinux /bin/bash
-
Inside the docker container under the
io/src
folder runKALDI_ROOT=/opt/kaldi make all
to compile your changes. -
Go to the
io/c
folderln -s ../model .
to symlink the model directory you created in step 2 inside this folder. Next, runKALDI_ROOT=/opt/kaldi make all
to compile the C scripts. This should create an executable for the C script. To test the custom functionalities built by ETS team, run the command./test_phone_results
. This should print out the expected results for the script.