Ar4ikov commited on
Commit
5e9d349
1 Parent(s): 6b4e503

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -43,9 +43,11 @@ model.to(device)
43
 
44
 
45
  def transcribe(audio):
46
- command = f"sox -t wav {audio} -r 16000 -b 16 c_{audio} channels 1"
47
- subprocess.call(command, shell=False)
48
- return predict(f"c_{audio}", 16000)
 
 
49
 
50
 
51
  def get_asr_interface():
 
43
 
44
 
45
  def transcribe(audio):
46
+ filename = audio.split("/")[-1]
47
+ print(filename, f"c_{filename}")
48
+ command = f"sox -t wav /tmp/{filename} -r 16000 -b 16 /tmp/c_{filename} channels 1"
49
+ subprocess.call(command, shell=True)
50
+ return predict(f"/tmp/c_{filename}", 16000)
51
 
52
 
53
  def get_asr_interface():