python 3.x - ConnectionResetError with Google Speech recognition -


i have audio file, want convert text using google speech recognition. i'm facing below issue.

code :

from os import path audio_file = path.join(path.dirname(path.realpath('c:\\users\\anagha\\documents\\python scripts')),"python scripts\\res1.wav")  r = sr.recognizer() sr.audiofile(audio_file) source:     audio = r.record(source)  try:     print("google speech recognition thinks said " + r.recognize_google(audio,key="my_api_key")) except sr.unknownvalueerror:     print("google speech recognition not understand audio") except sr.requesterror e:     print("could not request results google speech recognition service; {0}".format(e)) 

error i'm facing:

 connectionreseterror: [winerror 10054] existing connection forcibly closed remote host 


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -