dwarkesh commited on
Commit
d2abe69
1 Parent(s): 16d8857

ffmpeg fix

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -49,12 +49,9 @@ def convert_to_wav(path):
49
  if path[-3:] != 'wav':
50
  new_path = '.'.join(path.split('.')[:-1]) + '.wav'
51
  try:
52
- subprocess.call(['ffmpeg', '-i', path, '-c', 'copy', new_path, '-y'])
53
  except:
54
- try:
55
- subprocess.call(['ffmpeg', '-i', path, new_path, '-y'])
56
- except:
57
- return path, 'Error: Could not convert file to .wav'
58
  path = new_path
59
  return path, None
60
 
 
49
  if path[-3:] != 'wav':
50
  new_path = '.'.join(path.split('.')[:-1]) + '.wav'
51
  try:
52
+ subprocess.call(['ffmpeg', '-i', path, new_path, '-y'])
53
  except:
54
+ return path, 'Error: Could not convert file to .wav'
 
 
 
55
  path = new_path
56
  return path, None
57