goodatlas / react-native-audio-record

Audio record buffers for React Native (iOS and Android)
MIT License
176 stars 101 forks source link

Silence detection #77

Open georgetk opened 1 year ago

georgetk commented 1 year ago

Is it possible to detect silence? Specifically in:

AudioRecord.on('data', data => {
  // base64-encoded audio data chunks
  // Check whether this data instance is silent or not
});

If anybody knows some method to detect silence (that works in React Native) in base64 data kindly share!

jecs89 commented 1 year ago

You can check the signal and set a threshold to say if there is silence.

georgetk commented 1 year ago

@jecs89, thanks for the input! But I'm not sure how to do that on base64 data. Would be really helpful if you could share something.