NavodPeiris / speechlib

speechlib is a library that can do speaker diarization, transcription and speaker recognition on an audio file to create transcripts with actual speaker names
MIT License
114 stars 10 forks source link

ModuleNotFoundError: No module named 'speechbrain.pretrained' #20

Closed inv-adityamanoj closed 3 months ago

inv-adityamanoj commented 4 months ago

i tried to run the example file given in the readme on git and followed the instructions for the voice_folders but when i try to run it i get the error ModuleNotFoundError: No module named 'speechbrain.pretrained'

We made sure speechbrain is pip installed. Tried to uninstall and reinstall. And tried to upgrade the speechbrain package too.

Am i missing something here?

NavodPeiris commented 4 months ago

thanks for the issue. Speechbrain has updated to version 1.0.0 where it has updated the way modules are imported. however, still version 1.0.0 is not compatible with pyannote.audio 3.1.1 so we should stick with old speechbrain for now. I actually forgot to set the versions of the dependencies. that is why all dependencies are updated to latest version. i will patch the issue.

inv-adityamanoj commented 4 months ago

Yeah i think we found a work around but it involved editing alot of the packages. Is there any specific version we should roll-back too?

NavodPeiris commented 4 months ago

I have used speechbrain==0.5.16 in the latest release of speechlib. now it is running as intended.

inv-adityamanoj commented 4 months ago

Will give that a try. Thank you so much!

nobodyz commented 4 months ago

Ran into the same error, it seems like the fix is quite simple in speechlib as well. The imports in speechlib have to be changed from speechbrain.pretrained to speechbrain.inference (speaker_identification.py and speaker_recognition.py). Have not done any testing apart from the supplied example scripts, but those worked after the changes.

Waxolunist commented 3 months ago

@nobodyz Did you use 1.0.0 or 0.5.16 of speechbrain?