try:
text = r.recognize_ibm(audio, username=IBM_USERNAME, password=IBM_PASSWORD)
print("Attacker Said: " + (text))
except sr.UnknownValueError:
print("IBM Speech to Text could not understand audio")
except sr.RequestError as e:
print("Could not request results from IBM Speech to Text service; {0}".format(e))
finally:
data = r.recognize_ibm(audio, username=IBM_USERNAME, password=IBM_PASSWORD)
if data == "hello":
print(data)
dimanche 6 août 2017
Why isn't my if statement not executing in Python?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire