Zpracování mluveného jazyka v Pythonu
Daniel Bourke
Machine Learning Engineer/YouTube Creator
Některé existující knihovny pro Python
Instalace z 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 obsahuje vestavěné funkce pro komunikaci s řečovými APIrecognize_bing()recognize_google()recognize_google_cloud()recognize_wit()Vstup: audio_file
Výstup: přepsaná řeč ze souboru audio_file
Zaměříme se na recognize_google()
Rozpoznání řeči ze zvukového souboru pomocí SpeechRecognition:
# Import SpeechRecognition library import speech_recognition as sr# Instantiate Recognizer class recognizer = sr.Recognizer()# Transcribe speech using Google web API recognizer.recognize_google(audio_data=audio_file, language="en-US")
Learning speech recognition on DataCamp is awesome!
Zpracování mluveného jazyka v Pythonu