Does any one know of an application that can convert audio to text? I'm running ubuntu 12.04 LTS.
The software you can use is Vosk-api, a modern speech recognition toolkit based on neural networks. It supports 7+ languages and works on variety of platforms including RPi and mobile.
First you convert the file to the required format and then you recognize it:
ffmpeg -i file.mp3 -ar 16000 -ac 1 file.wav
Then install vosk-api with pip:
pip3 install vosk
Then use these steps:
git clone https://github.com/alphacep/vosk-api cd vosk-api/python/example wget https://github.com/alphacep/kaldi-android-demo/releases/download/2020-01/alphacep-model-android-en-us-0.3.tar.gz tar xf alphacep-model-android-en-us-0.3.tar.gz mv alphacep-model-android-en-us-0.3 model-en python3 ./test_simple.py file.wav > file.json
Result will be stored in json format.
I know this is old, but to expand on Nikolay's answer and hopefully save someone some time in the future, in order to get an up-to-date version of pocketsphinx working you need to compile it from the github or sourceforge repository (not sure which is kept more up to date). Note the -j8 means run 8 separate jobs in parallel if possible; if you have more CPU cores you can increase the number.
git clone https://github.com/cmusphinx/sphinxbase.git cd sphinxbase ./autogen.sh ./configure make -j8 make -j8 check sudo make install cd .. git clone https://github.com/cmusphinx/pocketsphinx.git cd pocketsphinx ./autogen.sh ./configure make -j8 make -j8 check sudo make install cd ..
Then, from: https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/US%20English/
download the newest versions of
tar -xzf cmusphinx-en-us-....tar.gz gunzip en-70k-....lm.gz
Then you can finally proceed with the steps from Nikolay's answer:
ffmpeg -i book.mp3 -ar 16000 -ac 1 book.wav pocketsphinx_continuous -infile book.wav \ -hmm cmusphinx-en-us-8khz-5.2 -lm en-70k-0.2.lm \ 2>pocketsphinx.log >book.txt
Sphinx works alright. I wouldn't rely on it to make a readable version of the text, but it's good enough that you can search it if you're looking for a particular quote. That works especially well if you use a search algorithm like Xapian (http://www.lesbonscomptes.com/recoll/) which accepts wildcards and doesn't require exact search expressions.
Hope this helps.
I you are looking to convert speech to text you could try opening up your Ubuntu Software Center and search for Julius
"Julius" is a high-performance, two-pass large vocabulary continuous speech recognition (LVCSR) decoder software for speech-related researchers and developers.
Or another option that isn't in the Software Center is Simon
... is an open-source speech recognition program and replaces the mouse and keyboard.
You can use Mozilla DeepSpeech is an opensource speech-to-text tool. But you will need to train the application or download Mozilla's pre-trained model. For my project, the accuracy was still not sufficient, as audio files were not good quality, and used Transcribear instead, a web based editor with speech-to-text capabilities, but you will need to be connected online to upload recordings to the Transcribear server.