Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence detection #112

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ArturWyszomirski
Copy link

Silence detection implementation for Windows and Android.

A DetectSilenceAsync should be fired after starting recording audio. The DetectSilenceAsync task is completed when silence is detected. A silence is when the recorded audio level is less or equal to silenceTreshold multiplied by noise* for silenceDuration period of time.

The SoundDetected property is set to false after each start of recording. When a sound greater than silenceTreshold multiplied by noise is detected the SoundDetected is set to true.

Most of the code is shared. The only platform specific part is the GetAudioChunk method which is responsible for providing a stream of audio data samples to the DetectSilence method.

* noise is the lowest detected audio level detected during recording but not lower than 0.01 (the values are normalized)

@jfversluis
Copy link
Owner

@ArturWyszomirski thank you so much for this! We do need the iOS implementation for this to be able to merge. Lets see if someone is willing to help out or I'll see if I can have a look myself :)

@FreakyAli
Copy link

I might have some time later this month if nobody else picks it up by then I think I will 👍

@jfversluis
Copy link
Owner

@FreakyAli that would be amazing, feel free to do so!

@ArturWyszomirski ArturWyszomirski deleted the SilenceDetection branch September 9, 2024 20:45
@ArturWyszomirski ArturWyszomirski restored the SilenceDetection branch September 9, 2024 21:23
@ArturWyszomirski
Copy link
Author

Sorry for that... I just wanted to rename branch. Didn't know it will work that way:/

@jfversluis
Copy link
Owner

No worries! I was already sad you were closing it haha! @FreakyAli would you still have time to look at this? Else I might see if I can take some time to make an attempt

@ArturWyszomirski
Copy link
Author

Quite the opposite:) I have just fixed the conflict with the latest commit and working on making a sample of silence detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants