Spoken Language Processing in Python
Daniel Bourke
Machine Learning Engineer/YouTube Creator
Some existing python libraries
Install from PyPi:
$ pip install SpeechRecognition
# Import the SpeechRecognition library import speech_recognition as sr# Create an instance of Recognizer recognizer = sr.Recognizer()# Set the energy threshold recognizer.energy_threshold = 300
Recognizer class has built-in functions which interact with speech APIsrecognize_bing()recognize_google()recognize_google_cloud()recognize_wit()Input: audio_file
Output: transcribed speech from audio_file
Focus on recognize_google()
Recognize speech from an audio file with SpeechRecognition:
# Import SpeechRecognition library import speech_recognition as sr# Instantiate Recognizer class recognizer = sr.Recognizer()# Transcribe speech using Goole web API recognizer.recognize_google(audio_data=audio_file language="en-US")
Learning speech recognition on DataCamp is awesome!
Spoken Language Processing in Python