Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -43,9 +43,11 @@ model.to(device)
|
|
43 |
|
44 |
|
45 |
def transcribe(audio):
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
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():
|