Zpracování mluveného jazyka v Pythonu
Daniel Bourke
Machine Learning Engineer/YouTube Creator
Existující Python knihovny
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 práci se speech APIrecognize_bing()recognize_google()recognize_google_cloud()recognize_wit()Vstup: audio_file
Výstup: přepis řeči z audio_file
Zaměříme se na recognize_google()
Přepis řeči z audio souboru pomocí 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!
Zpracování mluveného jazyka v Pythonu