google / visqol

Perceptual Quality Estimator for speech and audio
Apache License 2.0
683 stars 124 forks source link

Too few samples #31

Closed gabrielmittag closed 3 years ago

gabrielmittag commented 3 years ago

I obtain this error for various files although the reference files are long enough and can for example be predicted with POLQA.

[comparison_patches_selector.cc : 331] RAW: Error building ref spectrogram: INVALID_ARGUMENT: Too few samples (484) in signal to build spectrogram (320 required minimum). [visqol_manager.cc : 119] RAW: Error executing ViSQOL: INVALID_ARGUMENT: Too few samples (484) in signal to build spectrogram (320 required minimum)..

mchinen commented 3 years ago

Thanks for the report. That error message is incorrect (I have a patch to fix it) but ViSQOL is still not getting enough samples for some reason. If the input files are somewhat aligned speech >= 3 seconds, perhaps this indicates a bug in the alignment step (484 samples is not long enough to build a single frame, and not enough for ViSQOL to comment on quality).

Can you confirm that the input lengths of both degraded and reference and that they have the same utterance? Are you able to share the files by any chance? It would help for debugging if the files are valid.

gabrielmittag commented 3 years ago

Thanks for your answer. I uploaded two sets of degraded and reference files. The first one gives the error in audio mode and the second one in speech mode.

https://tubcloud.tu-berlin.de/s/LWi3NrRWXyQkEjb

mchinen commented 3 years ago

Thank you, this seems like an interesting case. I will be looking at it.

FeargusOG commented 3 years ago

I noticed where this was failing and submitted a PR for it here: https://github.com/google/visqol/pull/34

FeargusOG commented 3 years ago

I closed that PR in favour of an alternate fix being rolled out.

mchinen commented 3 years ago

This should be fixed now.