From d2063de39580faf01a5ab283b1fece7414a80325 Mon Sep 17 00:00:00 2001 From: Jonathan Evans <4038905+jrhe@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:10:10 +0000 Subject: [PATCH] Pass device to demucs to ensure correct device is used --- Whisper_Transcription_+_NeMo_Diarization.ipynb | 2 +- diarize.py | 2 +- diarize_parallel.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Whisper_Transcription_+_NeMo_Diarization.ipynb b/Whisper_Transcription_+_NeMo_Diarization.ipynb index 7768eb3..a799389 100644 --- a/Whisper_Transcription_+_NeMo_Diarization.ipynb +++ b/Whisper_Transcription_+_NeMo_Diarization.ipynb @@ -765,7 +765,7 @@ " # Isolate vocals from the rest of the audio\n", "\n", " return_code = os.system(\n", - " f'python -m demucs.separate -n htdemucs --two-stems=vocals \"{audio_path}\" -o \"temp_outputs\"'\n", + " f'python -m demucs.separate -n htdemucs --two-stems=vocals \"{audio_path}\" -o \"temp_outputs\" --device \"{device}\"'\n", " )\n", "\n", " if return_code != 0:\n", diff --git a/diarize.py b/diarize.py index 24ce998..dbaa021 100644 --- a/diarize.py +++ b/diarize.py @@ -96,7 +96,7 @@ # Isolate vocals from the rest of the audio return_code = os.system( - f'python -m demucs.separate -n htdemucs --two-stems=vocals "{args.audio}" -o temp_outputs' + f'python -m demucs.separate -n htdemucs --two-stems=vocals "{args.audio}" -o temp_outputs --device "{args.device}"' ) if return_code != 0: diff --git a/diarize_parallel.py b/diarize_parallel.py index 0124f51..44fe053 100644 --- a/diarize_parallel.py +++ b/diarize_parallel.py @@ -94,7 +94,7 @@ # Isolate vocals from the rest of the audio return_code = os.system( - f'python -m demucs.separate -n htdemucs --two-stems=vocals "{args.audio}" -o temp_outputs' + f'python -m demucs.separate -n htdemucs --two-stems=vocals "{args.audio}" -o temp_outputs --device "{args.device}"' ) if return_code != 0: