When I run my code, wit.ai try to recognize English words of "myspeech.wav" but that is Persian voice, How should I change my code?
def RecognizeSpeech(AUDIO_FILENAME):
audio = open('myspeech.wav','r')
headers = {'authorization': 'Bearer ' + wit_access_token,
'Content-Type': 'audio/wav'}
resp = requests.post(API_ENDPOINT, headers = headers,
data = audio)
data = json.loads(resp.content)
text = data['_text']
return text