Convert speech (mp3 audio files) to text

Solution 1:

pocketsphinx will do speech to text from an existing audio file. Depending on the initial format of the mp3, you may need two separate commands.

First convert your existing audio file to the mandatory input format:

    ffmpeg -i file.mp3 -ar 16000 -ac 1 file.wav

The run pocketsphinx

    pocketsphinx_continuous -infile file.wav 2> pocketsphinx.log > myspeech.txt

the created file myspeech.txt will have what you're looking for.


In case you are new to ubuntu, you would need to install the above programs using this command:

    sudo apt install pocketsphinx pocketsphinx-en-us ffmpeg

Solution 2:

Mozilla SpeechDeep opensource speech-to-text tool will do. You will need to install the application on your linux desktop. Or you can try Transcribear a browser based speech-to-text tool that does not require installation, but you will need to be connected online to upload the recording to the server.