Spaces:
Runtime error
Runtime error
ahmedJaafari
commited on
Commit
·
60924ba
1
Parent(s):
cc69677
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ processor = Wav2Vec2ProcessorWithLM.from_pretrained("ahmedJaafari/Annarabic3.2",
|
|
14 |
model = AutoModelForCTC.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=st.secrets["AnnarabicToken"])
|
15 |
|
16 |
# define function to read in sound file
|
17 |
-
def speech_file_to_array_fn(path, max_seconds=
|
18 |
batch = {"file": path}
|
19 |
speech_array, sampling_rate = torchaudio.load(batch["file"])
|
20 |
if sampling_rate != 16000:
|
|
|
14 |
model = AutoModelForCTC.from_pretrained("ahmedJaafari/Annarabic3.2", cache_dir=cache_dir, use_auth_token=st.secrets["AnnarabicToken"])
|
15 |
|
16 |
# define function to read in sound file
|
17 |
+
def speech_file_to_array_fn(path, max_seconds=120):
|
18 |
batch = {"file": path}
|
19 |
speech_array, sampling_rate = torchaudio.load(batch["file"])
|
20 |
if sampling_rate != 16000:
|