Pemrosesan Bahasa Lisan dengan Python
Daniel Bourke
Machine Learning Engineer/YouTube Creator
Beberapa library Python yang ada
Instal dari 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 punya fungsi bawaan untuk berinteraksi dengan API ucapanrecognize_bing()recognize_google()recognize_google_cloud()recognize_wit()Input: audio_file
Output: transkrip ucapan dari audio_file
Fokus pada recognize_google()
Kenali ucapan dari file audio dengan 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!
Pemrosesan Bahasa Lisan dengan Python