ajayarora1235 commited on
Commit
1833c9a
·
1 Parent(s): 8fd9be6

account for spaces in audio file

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1450,7 +1450,7 @@ def transcribe_btn_click(audio_choice):
1450
  # move the audio and transcript to temp folder
1451
  temp_folder = "./demo/temp"
1452
  os.makedirs(temp_folder, exist_ok=True)
1453
- os.system(f"cp {orig_audio} {temp_folder}")
1454
  filename = os.path.splitext(orig_audio.split("/")[-1])[0]
1455
  with open(f"{temp_folder}/{filename}.txt", "w") as f:
1456
  f.write(orig_transcript)
 
1450
  # move the audio and transcript to temp folder
1451
  temp_folder = "./demo/temp"
1452
  os.makedirs(temp_folder, exist_ok=True)
1453
+ os.system(f"cp \"{orig_audio}\" \"{temp_folder}\"")
1454
  filename = os.path.splitext(orig_audio.split("/")[-1])[0]
1455
  with open(f"{temp_folder}/{filename}.txt", "w") as f:
1456
  f.write(orig_transcript)