-1

is there any plugin that could catch the sound and save it? So it would wait for some sound threshold and only then would start writing sound to file or just could ping, that the any sound was heard?

Tautvydas
  • 72
  • 1
  • 11

1 Answers1

1

Try this: cordova-plugin-sound-meter

Use this code to initiate the detection:

window.soundMeterPlugin.getAmplitude(function(e){
    //success callback
    alert(e["amplitude"]);
    }, function(e){
    //error callback
    alert('The error is: ' + e);
});

On Success callback, You can start to record audio using Cordova Media Capture to Record Audio