I try to read the text from audio file:
import speech_recognition as sr
# obtain path to "english.wav" in the same folder as this script
from os import path
AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), "09.04.01 KMCTC.wav")
# AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), "french.aiff")
# AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), "chinese.flac")
# # use the audio file as the audio source
r = sr.Recognizer()
with sr.AudioFile(AUDIO_FILE) as source:
audio = r.record(source) # read the entire audio file
HOUNDIFY_CLIENT_ID = "qt-kd2mxXrlJO-eZGfvV_A==" # Houndify client IDs are Base64-encoded strings
HOUNDIFY_CLIENT_KEY = "YAeInVWu2yamXAmw8KBVeMpiBA7kvVijysDF0HW-jm9oZA0ip97dH38nOSuQPGG7suxKuZg3MLgdjrVjPB74ZA==" # Houndify client keys are Base64-encoded strings
try:
print("Houndify thinks you said " + r.recognize_houndify(audio, client_id=HOUNDIFY_CLIENT_ID, client_key=HOUNDIFY_CLIENT_KEY))
except sr.UnknownValueError:
print("Houndify could not understand audio")
except sr.RequestError as e:
print("Could not request results from Houndify service; {0}".format(e))
and I don't know why I get the same error:
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
How it fix? Any idea? Google Cloud Speech and other services dont'working (problems with API) using houndify I at least I could get the keys and go...