edimuj / cordova-plugin-audioinput

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.
https://github.com/edimuj/app-audioinput-demo
MIT License
161 stars 88 forks source link

Very high latency #34

Closed silverhawk184 closed 7 years ago

silverhawk184 commented 7 years ago

Hello, I am getting high latency while running via the WebAudioAPI. I am testing on a Nexus 6P, Android 7.1.1 with a crosswalk 19 app.

audioinput.start({
    streamToWebAudio: true,
    normalize: true, //got noisy but still delayed audio
    concatenateMaxChunks: 1, // attempted to lower latency, went from 5 seconds (10) to 2 seconds (1)
    audioSourceType: audioinput.AUDIOSOURCE_TYPE.UNPROCESSED //got no audio
});
audioinput.connect(audioinput.getAudioContext().destination);

Is there anything else I can tweak?

edimuj commented 7 years ago

I do not understand, you don't get any sound at all with the above settings, or you get sound with a 2s delay?

edimuj commented 7 years ago

Closing this issue, since there haven't been any activity for a while. Just give me a shout, if you want it to be reopened.