2019-10-15 Speech to text using Pocketsphinx!

For a while now I wondered how I would ever manage to transcribe my podcast episodes. Today I stumbled upon the CMUSphinx Tutorial For Developers and I discovered that pocketsphinx was available for my system! I installed it, and the US English language model, pocketsphinx-en-us.

Convert an MP3 file to WAV 16kHz 16-bit mono:

ffmpeg -i 01-halberds-and-helmets.mp3 -acodec pcm_s16le \
    -ac 1 -ar 16000 01-halberds-and-helmets.wav

Process it:

pocketsphinx_continuous -infile 01-halberds-and-helmets.wav \
    -hmm /usr/share/pocketsphinx/model/en-us/en-us \
    -lm /usr/share/pocketsphinx/model/en-us/en-us.lm.bin \
    -dict /usr/share/pocketsphinx/model/en-us/cmudict-en-us.dict \
    > 01-halberds-and-helmets.txt

Listen along, if you want to: 01-halberds-and-helmets.mp3.

Here’s what pocketsphinx produces:

hello this is our next big thing and desist
albert said helmet sport cause the first episode
i want to talk about my game
to the fairly simple i'm old school the indie game
very simple rules so very special but it's mine and ten
talking about it provides a framework for me to talk about all the games i like to play

Oh wow. This would require a lot of editing!

If I transcribe it, using the same linebreaks as above:

hello this is alex speaking and this is the
halberds and helmets podcast first episode
i want to talk about my game
a fairly simple old school d and d game
very simple rules it's not very special but it's mine and
talking about it provides a framework for me to talk about all the other games i like to play

Tags:

Comments


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.