question

balzzz avatar image
balzzz asked

Sample App

Hi I just want to create an android app which will use AVS. I successfully did the LWA module , now when the user clicks the record button I am able to record the audio successfully but in the documentation https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/getting-started-with-the-alexa-voice-service. it is specified that we need to pass the necessary HTTP header and other information and a speech request to the AVS API. Can someone please explain me what is the necessary HTTP header and other information,why is it needed.
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
Take a look at the request example on this page: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/rest/speechrecognizer-requests The HTTP headers are the Host, Authorization, Content-Type, and Transfer-Encoding. The LWA access token that you received should replace the { {xxxxxx}} next to the Authorization HTTP header. The 'other information' refers to the content of the JSON data blob that you send before the audio data, which includes things such as device context (what is the current state of your AVS device) as well as information on the audio that you're sending (profile, locale, format).
10 |5000

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