csukuangfj
commited on
Commit
·
1420134
1
Parent(s):
0d4bb51
add debug messages
Browse files
app.py
CHANGED
@@ -43,7 +43,9 @@ def convert_to_wav(in_filename: str) -> str:
|
|
43 |
out_filename = f"{in_filename}.wav"
|
44 |
|
45 |
logging.info(f"Converting '{in_filename}' to '{out_filename}'")
|
46 |
-
_ = os.system(
|
|
|
|
|
47 |
|
48 |
return out_filename
|
49 |
|
|
|
43 |
out_filename = f"{in_filename}.wav"
|
44 |
|
45 |
logging.info(f"Converting '{in_filename}' to '{out_filename}'")
|
46 |
+
_ = os.system(
|
47 |
+
f"ffmpeg -hide_banner -i '{in_filename}' -ar 16000 -ac 1 '{out_filename}' -y"
|
48 |
+
)
|
49 |
|
50 |
return out_filename
|
51 |
|
model.py
CHANGED
@@ -22,6 +22,10 @@ import torch
|
|
22 |
import torchaudio
|
23 |
from huggingface_hub import hf_hub_download
|
24 |
|
|
|
|
|
|
|
|
|
25 |
os.system(
|
26 |
"cp -v /home/user/.local/lib/python3.8/site-packages/k2/lib/*.so /home/user/.local/lib/python3.8/site-packages/sherpa/lib/"
|
27 |
)
|
|
|
22 |
import torchaudio
|
23 |
from huggingface_hub import hf_hub_download
|
24 |
|
25 |
+
os.system(
|
26 |
+
"cp -v /usr/local/lib/python3.8/site-packages/k2/lib/*.so //usr/local/lib/python3.8/site-packages/sherpa/lib/"
|
27 |
+
)
|
28 |
+
|
29 |
os.system(
|
30 |
"cp -v /home/user/.local/lib/python3.8/site-packages/k2/lib/*.so /home/user/.local/lib/python3.8/site-packages/sherpa/lib/"
|
31 |
)
|