小编Sud*_*dar的帖子

如何更改谷歌语音识别的语言

我的代码:

with sr.Microphone() as source:
    audio = r.listen(source)
    try:
        print("You said: " + r.recognize_google(audio) + "in french")
    except sr.UnknownValueError:
        print("Google Speech Recognition could not understand audio")
    except sr.RequestError as e:
        print("Could not request results from Google Speech Recognition service")
Run Code Online (Sandbox Code Playgroud)

我想将收听语言更改为法语。我该怎么做?

python speech-recognition python-3.x french google-speech-api

2
推荐指数
1
解决办法
2万
查看次数