microsoft / MS-SNSD

The Microsoft Scalable Noisy Speech Dataset (MS-SNSD) is a noisy speech dataset that can scale to arbitrary sizes depending on the number of speakers, noise types, and Speech to Noise Ratio (SNR) levels desired.
MIT License
468 stars 142 forks source link

fix bug - snr levels should be strict int #15

Open ma7555 opened 4 years ago

ma7555 commented 4 years ago

fixes this bug

Traceback (most recent call last):
  File "e:/MS-SNSD-master/noisyspeech_synthesizer.py", line 125, in <module>
    main(cfg._sections[args.cfg_str])
  File "e:/MS-SNSD-master/noisyspeech_synthesizer.py", line 48, in main
    SNR = np.linspace(snr_lower, snr_upper, total_snrlevels)
  File "<__array_function__ internals>", line 6, in linspace
  File ".\anaconda3\lib\site-packages\numpy\core\function_base.py", line 121, in linspace
    .format(type(num)))
TypeError: object of type <class 'float'> cannot be safely interpreted as an integer.
anupsingh15 commented 3 years ago

While computing SNR, you take the square root of the scalar; shouldn't you avoid it because you are considering the RMS values instead of the power?

ma7555 commented 2 years ago

this is the value of SNR levels between lower and upper levels. Can only be an integer