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
138 stars 12 forks source link

Add MPS support #25

Closed killianeletellier closed 4 months ago

killianeletellier commented 5 months ago

This pull request adds MPS support to the diarization process. It makes this step of the execution much faster on Apple Silicon Macs.

killianeletellier commented 4 months ago

Hey, Yes.

It needs to add PYTORCH_ENABLE_MPS_FALLBACK=1 as an environment variable, but the diarization is more than 100 times faster.

NavodPeiris commented 4 months ago

then you have to set that environment variable in python script

import os

os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

commit this change and i will merge.

killianeletellier commented 4 months ago

Oh, yes ! You're right !

I added it locally, but it seems like it committed too soon !

NavodPeiris commented 4 months ago

seems all good. Thank you for contributing!!