Spaces:
Sleeping
Sleeping
GVAmaresh
commited on
Commit
·
4996177
1
Parent(s):
453cd84
dev: check working
Browse files- app.py +9 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -24,4 +24,13 @@ bundle = WAV2VEC2_BASE
|
|
| 24 |
model = bundle.get_model()
|
| 25 |
print("Model downloaded successfully!")
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
#-----------------------------------------------------------------------------------------
|
|
|
|
| 24 |
model = bundle.get_model()
|
| 25 |
print("Model downloaded successfully!")
|
| 26 |
|
| 27 |
+
#-----------------------------------------------------------------------------------------
|
| 28 |
+
import subprocess
|
| 29 |
+
|
| 30 |
+
def reencode_audio(input_path, output_path):
|
| 31 |
+
command = [
|
| 32 |
+
'ffmpeg', '-i', input_path, '-acodec', 'pcm_s16le', '-ar', '16000', '-ac', '1', output_path
|
| 33 |
+
]
|
| 34 |
+
subprocess.run(command, check=True)
|
| 35 |
+
|
| 36 |
#-----------------------------------------------------------------------------------------
|
requirements.txt
CHANGED
|
@@ -15,4 +15,5 @@ librosa
|
|
| 15 |
soundfile
|
| 16 |
python-multipart
|
| 17 |
matplotlib
|
| 18 |
-
numpy
|
|
|
|
|
|
| 15 |
soundfile
|
| 16 |
python-multipart
|
| 17 |
matplotlib
|
| 18 |
+
numpy
|
| 19 |
+
gdown
|