TaahKay commited on
Commit
2e6882a
·
verified ·
1 Parent(s): 9a5a9c0

Update utils/audio_processing.py

Browse files
Files changed (1) hide show
  1. utils/audio_processing.py +1 -1
utils/audio_processing.py CHANGED
@@ -75,7 +75,7 @@ def download_audio_as_wav(url, max_filesize_mb=70):
75
  # Convert to WAV (outside temp_dir so it persists)
76
  temp_wav = tempfile.NamedTemporaryFile(delete=False, suffix=".wav")
77
  convert_cmd = ["ffmpeg", "-y", "-i", audio_path, temp_wav.name]
78
- subprocess.run(convert_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
79
 
80
  # Return WAV file path; temp_dir and downloaded audio cleaned automatically
81
  return temp_wav.name
 
75
  # Convert to WAV (outside temp_dir so it persists)
76
  temp_wav = tempfile.NamedTemporaryFile(delete=False, suffix=".wav")
77
  convert_cmd = ["ffmpeg", "-y", "-i", audio_path, temp_wav.name]
78
+ subprocess.run(convert_cmd, stdout=subprocess.PIPE("utf-8", errors="ignore"), stderr=subprocess.PIPE("utf-8", errors="ignore"), check=True)
79
 
80
  # Return WAV file path; temp_dir and downloaded audio cleaned automatically
81
  return temp_wav.name