This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
When stop is called, recording is stopped and the data written to the specified file, and then an 'audioinputfinished' event is raised, which includes the original file URL:
NB there is a request for saving audio input to files - these changes don't exactly fulfil this request, as here the audio is saved to a file instead of (rather than as well as) being passed in events, and the target format is not the requested M4A. I have tested these changes with WAV files, as this is what my project requires.
As an alternative to event-based capture of audio data, these changes allow the plugin to save audio directly to a file.
To enable this option, add a fileUrl setting to the capture config passed into the start method - e.g.
When stop is called, recording is stopped and the data written to the specified file, and then an 'audioinputfinished' event is raised, which includes the original file URL:
NB there is a request for saving audio input to files - these changes don't exactly fulfil this request, as here the audio is saved to a file instead of (rather than as well as) being passed in events, and the target format is not the requested M4A. I have tested these changes with WAV files, as this is what my project requires.