This project has moved. For the latest updates, please go here.

Collecting multiple chunks of audio from recorded microphone

Apr 17, 2014 at 3:13 PM

I'm build an application that must split recorded sound from microphone into separate files to send via POST, this way i can send files on fly and dont have wait for the final output file.
How can i do that? and also only start recordering when detect some voice input, cutting all mute sound?

Split example: Create a WAV file every x seconds

May 6, 2014 at 8:11 PM
Well you'd record all the time, and then check each sample to see if it goes above your minimum threshold. If so, you'd create a WaveFileWriter and start writing. Once you got a buffer with silence, close the WAV file. To split files, just create a new WaveFileWriter once you've written more than the max duration you want in a WAV file.