Skip to content

RuntimeWarning in estnoisems function #1

@newrlan

Description

@newrlan

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions