Spaces:
Sleeping
Sleeping
Commit
·
9a82013
1
Parent(s):
318260c
Upgrade gradio
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🎤
|
|
4 |
colorFrom: green
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
duplicated_from: ayymen/MMS-ASR
|
|
|
4 |
colorFrom: green
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.50.2
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
duplicated_from: ayymen/MMS-ASR
|
app.py
CHANGED
@@ -27,7 +27,7 @@ def transcribe(audio_file_mic=None, audio_file_upload=None, language="English (e
|
|
27 |
# Make sure audio is 16kHz
|
28 |
speech, sample_rate = librosa.load(audio_file)
|
29 |
if sample_rate != 16000:
|
30 |
-
progress(
|
31 |
speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
|
32 |
|
33 |
# Cut speech into chunks
|
@@ -40,7 +40,7 @@ def transcribe(audio_file_mic=None, audio_file_upload=None, language="English (e
|
|
40 |
model.load_adapter(language_code)
|
41 |
|
42 |
transcriptions = []
|
43 |
-
progress(
|
44 |
for chunk in progress.tqdm(chunks, desc="Transcribing"):
|
45 |
inputs = processor(chunk, sampling_rate=16_000, return_tensors="pt")
|
46 |
|
|
|
27 |
# Make sure audio is 16kHz
|
28 |
speech, sample_rate = librosa.load(audio_file)
|
29 |
if sample_rate != 16000:
|
30 |
+
progress(0.01, desc="Resampling")
|
31 |
speech = librosa.resample(speech, orig_sr=sample_rate, target_sr=16000)
|
32 |
|
33 |
# Cut speech into chunks
|
|
|
40 |
model.load_adapter(language_code)
|
41 |
|
42 |
transcriptions = []
|
43 |
+
progress(0.02, desc="Transcribing")
|
44 |
for chunk in progress.tqdm(chunks, desc="Transcribing"):
|
45 |
inputs = processor(chunk, sampling_rate=16_000, return_tensors="pt")
|
46 |
|