question

nathanmani avatar image
nathanmani asked

audio sampling rate

Is AVS support only 16000Hz Linear 16bit PCM. If not, what are the supported sampling rates by AVS? Is it possible to send audio to AVS as chunk (20 msec buffer) instead of sending once. If so , how to do?
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

sherritt@amazon avatar image
sherritt@amazon answered
Hey, 1. AVS only supports 16khz Linear 16bit PCM. It is a sufficient sample rate for understanding human speech. No other sample rates will work at this time. 2. Yes you can stream the audio to AVS. In fact we strongly encourage this to reduce latency. Specifically you should be streaming 10ms worth of audio data per chunk (320 bytes). Any other chunk size will result in larger latencies during requests. 3. How to stream is dependent on the language and library you are using. In our sample implementation (get the code here: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/docs/reference-implementation-guide#Obtaining%20the%20Sample%20App%20Code%20and%20Dependencies) we use java. Many java HTTP libraries allow you to get an OutputStream for the connection, and writing bytes to that Stream will stream them across the connection. You can look at AVSClient.java for an example of streaming the audio to AVS. Some of what I included here is not in the implementation guide yet, but we are actively working on updating it.
10 |5000

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