How to stream a WAV file?

后端 未结 3 1667
天命终不由人
天命终不由人 2020-12-21 10:06

I\'m writing an app where I record audio and upload the audio file over the web. In order to speed up the upload I want to start uploading before I\'ve finished recording.

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-21 10:18

    Where are you uploading to? Your own site? Sounds like you need some server-side code to take your raw sample uploads and assemble them into a valid WAV file (correct file-length field, one data chunk) on the server.

    But if you're really trying to speed up the upload, I'd think you actually want to upload MP3-encoded frames and have the server assemble those into an MP3 file. Which is more complicated, I'm afraid.

提交回复
热议问题