(audio)
| 9 | |
| 10 | #Query Wit |
| 11 | def wit(audio): |
| 12 | # recognize speech using Wit.ai |
| 13 | WIT_AI_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx" # Wit.ai keys are 32-character uppercase alphanumeric strings |
| 14 | try: |
| 15 | #print("Wit.ai: ") |
| 16 | return r.recognize_wit(audio, key=WIT_AI_KEY) |
| 17 | except sr.UnknownValueError: |
| 18 | print("Wit.ai could not understand audio") |
| 19 | return "None" |
| 20 | except sr.RequestError as e: |
| 21 | print("Could not request results from Wit.ai service; {0}".format(e)) |
| 22 | return "None" |
| 23 | |
| 24 | def bing(audio): |
| 25 | BING_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
nothing calls this directly
no outgoing calls
no test coverage detected