Skip to content

Commit

Permalink
Pass device to demucs to ensure correct device is used (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhe authored Dec 15, 2024
1 parent f35796c commit 2d0745e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Whisper_Transcription_+_NeMo_Diarization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion diarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion diarize_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2d0745e

Please sign in to comment.