📜  pyaudio 更改语言 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:44.743000             🧑  作者: Mango

代码示例1
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!")