Answers for "pyaudio change language"

0

pyaudio change language

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!")
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language