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

RuntimeWarning in estnoisems function #1

Open
newrlan opened this issue Oct 17, 2018 · 4 comments
Open

RuntimeWarning in estnoisems function #1

newrlan opened this issue Oct 17, 2018 · 4 comments

Comments

@newrlan
Copy link

newrlan commented Oct 17, 2018

Hi, I found a mistake when run VAD on a single. If the pSpectrum value has only zeroes on first string, the result of estnoisem function return table with np.nan. I added strings

begin = 0
while begin < nFrames and np.all(pSpectrum[begin,:] == 0.0):
        begin += 1
p=pSpectrum[begin,:]  

to redefinition p valuation and run for cycle in range(begin, nFrames).

That improve a crashing of code, but hold that mistake

Voice_Activity_Detector/utils/estnoise_ms.py:108: RuntimeWarning: divide by zero encountered in double_scalars
  acb=(1+(sum(p) / sum(pSpectrum_t)-1)**2)**(-1)    # alpha_c-bar(t)  (9)
@eesungkim
Copy link
Owner

Yes, I also think there is a problem on that part. Initial 'p' should be not zero or that big value comparing other frames.

Thank you for your feedback.

@krupalraj
Copy link

@proposition does that fix the crashing of code ??
iam having the same issue

@newrlan
Copy link
Author

newrlan commented Apr 6, 2020

@krupalraj yes, I did this, but I've not saved the code version.

The problem appears when your audio file have zero parts. The simplest way to avoid the problem is to cut off the zero regions.

@krupalraj
Copy link

sure,Thanks @proposition

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

3 participants