How to rename wav files based on their speech contents on Windows 10.
- Have a Python environment set up with version 3.3+. I have Python 3.7 in Anaconda on Windows 10.
- Download the SpeechToTextFileRename_Sphinx.py and save it to the folder where your .wav files exist.
- Download Swig for Windows – needed for pocketsphinx installation.
- To find your python path, at the command prompt type:
Where python
- Extract the contents of the swig download to a temp folder. Copy swig.exe to the python installation folder (ex. C:\Users\Justin\Anaconda3\envs\py37)
- Open swigwin-3.0.12/Lib folder and copy all *.swg files and the typemaps folder to the py37\lib or equivalent python path.
- Open swigwin-3.0.12/lib/python and copy all the files to py37\lib or equivalent python path.
- At the command prompt type:
pip install SpeechRecognition
- At the command prompt type:
pip install pocketsphinx
- Cd to the directory where you r .wav files exist.
- At the command prompt type:
python "Speech To Text File Rename.py"
References: https://realpython.com/python-speech-recognition/#picking-a-python-speech-recognition-package https://stackoverflow.com/questions/44504899/installing-pocketsphinx-python-module-command-swig-exe-failed