File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ Speech recognition engine/API support:
29
29
* Google Speech Recognition
30
30
* `Google Cloud Speech API <https://cloud.google.com/speech/ >`__
31
31
* `Wit.ai <https://wit.ai/ >`__
32
+ * `Microsoft Azure Speech <https://azure.microsoft.com/en-us/services/cognitive-services/speech/ >`__
32
33
* `Microsoft Bing Voice Recognition (Deprecated) <https://www.microsoft.com/cognitive-services/en-us/speech-api >`__
33
- * `Microsoft Azure Speech <https://www.microsoft.com/cognitive-services/en-us/speech-api >`__
34
34
* `Houndify API <https://houndify.com/ >`__
35
35
* `IBM Speech to Text <http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text.html >`__
36
36
* `Snowboy Hotword Detection <https://snowboy.kitt.ai/ >`__ (works offline)
Original file line number Diff line number Diff line change 50
50
except sr .RequestError as e :
51
51
print ("Could not request results from Wit.ai service; {0}" .format (e ))
52
52
53
+ # recognize speech using Microsoft Azure Speech
54
+ AZURE_SPEECH_KEY = "INSERT AZURE SPEECH API KEY HERE" # Microsoft Speech API keys 32-character lowercase hexadecimal strings
55
+ try :
56
+ print ("Microsoft Azure Speech thinks you said " + r .recognize_azure (audio , key = AZURE_SPEECH_KEY ))
57
+ except sr .UnknownValueError :
58
+ print ("Microsoft Azure Speech could not understand audio" )
59
+ except sr .RequestError as e :
60
+ print ("Could not request results from Microsoft Azure Speech service; {0}" .format (e ))
61
+
53
62
# recognize speech using Microsoft Bing Voice Recognition
54
63
BING_KEY = "INSERT BING API KEY HERE" # Microsoft Bing Voice Recognition API keys 32-character lowercase hexadecimal strings
55
64
try :
You can’t perform that action at this time.
0 commit comments