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

Define level of silence #85

Open
jamesoliver1981 opened this issue Apr 13, 2021 · 2 comments
Open

Define level of silence #85

jamesoliver1981 opened this issue Apr 13, 2021 · 2 comments

Comments

@jamesoliver1981
Copy link

Is your feature request related to a problem? Please describe.
This works really well however I have some background noise that is carried through and that I would like to be removed too Therefore it would be great if I could ignore silence below a certain threshold.

Describe the solution you'd like
A parameter of say decibels below which sound is treated as silence. Default can be zero.

Describe alternatives you've considered

Additional context

@lagmoellertim
Copy link
Owner

I think the feature you mean is already implemented, you could try the -sl MINIMUM_SILENCE_LEVEL flag in terminal (defaults to -35db) and adjust it to your liking. To see all available flags and options, you can use unsilence --help

@jamesoliver1981
Copy link
Author

jamesoliver1981 commented Apr 14, 2021

Thank you. I am working in jupyter rather than in the terminal. Looking at the code on git hub, I cannot see where I would adjust this.
I have tried this
u.detect_silence(MINIMUM_SILENCE_LEVEL = 70)

but sadly it didn't change the results at all though did not throw an error. Could you advise how I could use this feature?

I am using your suggested code to process the file:

from unsilence import Unsilence
u = Unsilence(path2+"first3_nopoints.wav")


u.detect_silence(MINIMUM_SILENCE_LEVEL = 70)

estimated_time = u.estimate_time(audible_speed=5, silent_speed=2)  # Estimate time savings
print(estimated_time)

u.render_media(path2+"first3_nopoints_silenceout_50.wav", audio_only=True)  

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

No branches or pull requests

2 participants