I am wondering if there is any file format that Alexa prefers or even needs to use when audio data is sent to it. Since most of the header for a file (e.g. a .wav file) is just metadata for the audio, I would think that this does not need to be included, since the channel, sample size, and sample rate are all predefined. The only thing besides that to include would be the size of the data, which should signified by the final boundary of the POST message.
Should the "binary encoded audio data" essentially just be a list of 16-bit integers, broken up as suggested into 320 byte frames? I know little about audio data compression, but I would assume that the data should be uncompressed, correct? As is, about 3 seconds of data recorded per specification by audacity gives a .wav file is about 100 kB.
Hopefully someone with libcurl/curl experience can answer this, to send frames of data through a post message, does this imply that all of these frames must still be under the same set of content/part headers, as it is on the page for structuring a request? There is libcurl upload example for http2 in which the data is broken up and included with a number of easy handles. The requests for these handles are then multiplexed across the same connection, but it does not seem to me that this would be a good solution here since is a) using the UPLOAD option as opposed to including it in a POST request and b) would not allow one to include all information in the same part body of the POST message.
I am hoping that there is a way to implement this using the formadd() function for setting up a multipart POST. Could anyone suggest methods for using frames to send the audio data? I am not sure how libcurl handles large multipart posts, but hopefully someone on their mailing list can clear that up for me.
If anyone has anything to add here or would like for me to clarify something, please ask! Thanks.