📅  最后修改于: 2022-03-11 15:00:44.743000             🧑  作者: Mango
import speech_recognition as sr
import pyaudio
r = sr.Recognizer()
with sr.Microphone() as source:
print("Má»i bạn nói: ")
audio = r.listen(source)
try:
text = r.recognize_google(audio,language="vi-VI")
print("Bạn -->: {}".format(text))
except:
print("Xin lá»i! tôi không nháºn Äược voice!")