AlexaAndroid icon indicating copy to clipboard operation
AlexaAndroid copied to clipboard

Why prerecorded audio is slower then sending audio in Chunks and Text sending is Slower then both

Open ghost opened this issue 5 years ago • 1 comments

Hi willblaschko,

We are working on AVS in android application. We are using your library as a reference

we have successfully sent audio to Alexa but response time is slower. so below are the questions we require some explaining.

  1. Why prerecorded audio response is slower?
  2. Why streaming audio response is faster as compared to prerecorded audio?
  3. Why sending text to audio is slower then the above 2 questions?
  4. How can we make prerecorded audio response faster?

ghost avatar Jul 01 '19 08:07 ghost

I know this question is for willblaschko but here are my insights on your questions.

  1. Prerecorded audio isn't being chunked. Chunking reduces the latency because Amazon can begin processing the audio when the first chunk is received.
  2. Why streaming audio response is faster as compared to prerecorded audio? Amazon is able to process audio as it's coming in. (Think of this as Alexa is listening as you are speaking vs Alexa waiting for you to finish speaking, then processing the audio then responding).
  3. Text sent must be converted to audio first using a text to speech library. The result is then sent (possibly not chunked).
  4. You would need to create a method that chunks the audio and streams it to Amazon.

ihavenoface5 avatar Jul 01 '19 15:07 ihavenoface5