Make sure you have Python installed:
$ python --version
Python version 3 is recommended.
$ pip install SpeechRecognition
audio-to-text.py that transcribes audio file
Hello World.wav to text:
import speech_recognition as sr r = sr.Recognizer() with sr.AudioFile('Hello World.wav') as source: audio = r.listen(source) text = r.recognize_google(audio) print(text)
$ python audio-to-text.py hello world
SpeechRecognition supports the following engines/API’s:
|Free||API exceptions (network timeout, file too big, rate limiting)|
|Accurate||Transcript does not include punctuation marks and can be off|
See guide for more details.
See GitHub repository for more details.