huggingface / dataspeech

MIT License
313 stars 48 forks source link

Update main.py #26

Closed p0p4k closed 5 months ago

p0p4k commented 5 months ago

Also if the speech_duration exists from the snr calculations, why have 'if else' statement here? https://github.com/huggingface/dataspeech/blob/84c6337858ba76a798a3b165b56a808aff0b5fde/main.py#L77-L94

ylacombe commented 5 months ago

Hey @p0p4k, thanks for catching and fixing this!

Also if the speech_duration exists from the snr calculations, why have 'if else' statement here?

One of the goal of this repo is to give recipes that are easy to use and modify. Let's say one wants to modify main.py to avoid the costly operation of SNR computation, I have thus left the code to perform speaking rate based on audio length rather than speech duration !

p0p4k commented 5 months ago

Then an apply flag for skipping snr should be there. I'll pr it soon.