How to record microphone audio in JavaScript and submit to DialogFlow?
问题 How can I record audio from the microphone in JavaScript and submit it to DialogFlow, without going through a server? 回答1: There are two parts to this question: How to record microphone audio in a format DialogFlow will understand. How to actually submit that audio to DialogFlow, with proper authentication. Part 1 For recording microphone audio in a format DialogFlow will understand, I use opus-recorder, then convert the blob it returns using the code below: function BlobToDataURL(blob: Blob)