Hello.
It is necessary to receive voice commands from the user, then these commands are processed on the backend, after which the answer is returned to the user in audio format.
I accept audio from the user with the help of annyang , and on the backend I give the finished text. This thing works well, but not in all browsers (in particular, in firefox - no)
Then I send the received text after a series of transformations to Watson , and from there, using text to speach , I receive an audio file, which I reproduce in the browser.
Everything seems to be normal, but autoplay in <audio> does not work on mobile browsers, and it seems to me that the work through POST/GET not very correct, as is being done now.
How to organize the interaction between the client and server in my situation?
The task is for a person to ask a question and get the answer he needs so that it is as fast and cross-browser as possible.
Now there is an inevitable delay on the server, since the data is sent to several services before giving an answer, but this can still be dealt with.
But what to do with playing an audio file in mobile browsers? In general, the idea of playing an audio file seems a little bit silly.
I would be extremely grateful for any tip in the right direction.
Thank you in advance!