Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding note on CUDA 12 for Faster whisper #875

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions buzz/transcriber/recording_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
model_path = self.model_path
keep_samples = int(0.15 * self.sample_rate)

if torch.cuda.is_available():
logging.debug(f"CUDA version detected: {torch.version.cuda}")

Check warning on line 66 in buzz/transcriber/recording_transcriber.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/recording_transcriber.py#L65-L66

Added lines #L65 - L66 were not covered by tests

if self.transcription_options.model.model_type == ModelType.WHISPER:
device = "cuda" if torch.cuda.is_available() else "cpu"
model = whisper.load_model(model_path, device=device)
Expand All @@ -76,6 +79,10 @@
logging.debug("CUDA GPUs are currently no supported on Running on Windows, using CPU")
device = "cpu"

if torch.cuda.is_available() and torch.version.cuda < "12":
logging.debug("Unsupported CUDA version (<12), using CPU")
device = "cpu"

Check warning on line 84 in buzz/transcriber/recording_transcriber.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/recording_transcriber.py#L82-L84

Added lines #L82 - L84 were not covered by tests

model = faster_whisper.WhisperModel(
model_size_or_path=model_path,
download_root=model_root_dir,
Expand Down
7 changes: 7 additions & 0 deletions buzz/transcriber/whisper_file_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"Starting whisper file transcription, task = %s", self.transcription_task
)

if torch.cuda.is_available():
logging.debug(f"CUDA version detected: {torch.version.cuda}")

Check warning on line 56 in buzz/transcriber/whisper_file_transcriber.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/whisper_file_transcriber.py#L56

Added line #L56 was not covered by tests

recv_pipe, send_pipe = multiprocessing.Pipe(duplex=False)

self.current_process = multiprocessing.Process(
Expand Down Expand Up @@ -146,6 +149,10 @@
logging.debug("CUDA GPUs are currently no supported on Running on Windows, using CPU")
device = "cpu"

if torch.cuda.is_available() and torch.version.cuda < "12":
logging.debug("Unsupported CUDA version (<12), using CPU")
device = "cpu"

Check warning on line 154 in buzz/transcriber/whisper_file_transcriber.py

View check run for this annotation

Codecov / codecov/patch

buzz/transcriber/whisper_file_transcriber.py#L153-L154

Added lines #L153 - L154 were not covered by tests

model = faster_whisper.WhisperModel(
model_size_or_path=model_size_or_path,
download_root=model_root_dir,
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ sidebar_position: 5

On Windows see [this note](https://github.com/chidiwilliams/buzz/blob/main/CONTRIBUTING.md#gpu-support) on enabling CUDA GPU support.

For Faster whisper CUDA 12 is required, computers with older CUDA versions will use CPU.

6. **How to fix `Unanticipated host error[PaErrorCode-9999]`?**

Check if there are any system settings preventing apps from accessing the microphone.

On Windows, see if Buzz has permission to use the microphone in Settings -> Privacy -> Microphone.

See method 1 in this video https://www.youtube.com/watch?v=eRcCYgOuSYQ

For method 2 there is no need to uninstall the antivirus, but see if you can temporarily disable it or if there are settings that may prevent Buzz from accessing the microphone.
Loading