ina-foss / inaSpeechSegmenter

CNN-based audio segmentation toolkit. Allows to detect speech, music, noise and speaker gender. Has been designed for large scale gender equality studies based on speech time per gender.
MIT License
717 stars 127 forks source link

nan values in the probability #68

Open matnshrn opened 2 years ago

matnshrn commented 2 years ago

Hey, thank you for this project! I'm using the branch with the probability field (https://github.com/ina-foss/inaSpeechSegmenter/tree/mf_proba), and found that in some cases the probability field contains nan. After debugging, I found that it happens because in the segmenter.py file, row 251, you replaced 0.5 probabilities in the probability scores array (named framepred) with nan, and after that when calculating the overall probability, you are averaging an array with nans, resulting with nan probability.

Is this the desired behavior? Why not just keeping probability 0.5?

Thank you.

DavidDoukhan commented 2 years ago

Dear @matnshrn , thanks for this comment related to this "not-so-used" branch. In order to help you with your issue, could you send me a sample of audio excerpt resulting in NaNs ? I haven't work on this branch since few months, and I'll need some time to remember if this behavior is normal :-)