question

neole avatar image
neole asked

AVS Response time

Hello there I tried to use AVS in specific board that use yocto linux. Connection and response were ok . But response time is a little bit slower than Alexa I am uising python for AVS and it is based on Alexachip codes like below -------------------------------------------------------------- def alexa(): url = ' https://access-alexa-na.amazon.com/v1/avs/speechrecognizer/recognize' headers = {'Authorization' : 'Bearer %s' % gettoken()} d = {     "messageHeader": {         "deviceContext": [             {                 "name": "playbackState",                 "namespace": "AudioPlayer",                 "payload": {                     "streamId": "",         "offsetInMilliseconds": "0",                     "playerActivity": "IDLE"                 }             }         ] },     "messageBody": {         "profile": "alexa-close-talk",         "locale": "en-us",         "format": "audio/L16; rate=16000; channels=1"     } } with open('recording.wav') as inf: files = [ ('file', ('request', json.dumps(d), 'application/json; charset=UTF-8')), ('file', ('audio', inf, 'audio/L16; rate=16000; channels=1')) ] r = requests.post(url, headers=headers, files=files) //response is a little bit slow ------------------------------------------------------------------------------------------------------------------------------------------ If Alexa use same AVS, I think my device should have similar response time. For improving this , Should I improve the internet speed or change code to use native C not python? Or what can I do for improving response time ?? thanks Message was edited by: neole
alexa voice service
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Eric@Amazon avatar image
Eric@Amazon answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.