Loren commited on
Commit
d2aef1b
·
verified ·
1 Parent(s): 6132f93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -239,13 +239,13 @@ def voice_extract_demucs(audio):
239
  Returns the path of the voice extracted file.
240
  """
241
  try:
242
- os.makedirs("demucs", exist_ok=True)
243
- write('audio_file.wav', audio[0], audio[1])
244
  cmd = [
245
  "demucs",
246
  "--two-stems=vocals",
247
- "--out", "demucs",
248
- "audio_file.wav"
249
  ]
250
  subprocess.run(cmd, check=True)
251
  voice_path = os.path.join(".", "demucs", "htdemucs", "audio_file", "vocals.wav")
 
239
  Returns the path of the voice extracted file.
240
  """
241
  try:
242
+ os.makedirs("out_demucs", exist_ok=True)
243
+
244
  cmd = [
245
  "demucs",
246
  "--two-stems=vocals",
247
+ "--out", "out_demucs",
248
+ audio
249
  ]
250
  subprocess.run(cmd, check=True)
251
  voice_path = os.path.join(".", "demucs", "htdemucs", "audio_file", "vocals.wav")