DrishtiSharma
commited on
Commit
•
4b7e966
1
Parent(s):
c5d4c36
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ def load_and_fix_data(input_file, model_sampling_rate):
|
|
12 |
return speech
|
13 |
|
14 |
|
15 |
-
feature_extractor = AutoFeatureExtractor.from_pretrained("jonatasgrosman/wav2vec2-
|
16 |
sampling_rate = feature_extractor.sampling_rate
|
17 |
|
18 |
-
asr = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-
|
19 |
|
20 |
|
21 |
|
@@ -37,7 +37,7 @@ def predict_and_ctc_lm_decode(input_file):
|
|
37 |
|
38 |
description = """ This is a Gradio demo of Spanish Audio Transcriptions to Quechua Translation. To use this, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and translated to the Quechua language.
|
39 |
|
40 |
-
Pre-trained model used for Spanish ASR: [jonatasgrosman/wav2vec2-
|
41 |
|
42 |
Pre-trained model used for translating Spanish audio transcription to the Quechua language: [t5-small-finetuned-spanish-to-quechua](https://huggingface.co/hackathon-pln-es/t5-small-finetuned-spanish-to-quechua)
|
43 |
|
|
|
12 |
return speech
|
13 |
|
14 |
|
15 |
+
feature_extractor = AutoFeatureExtractor.from_pretrained("jonatasgrosman/wav2vec2-xls-r-1b-spanish")
|
16 |
sampling_rate = feature_extractor.sampling_rate
|
17 |
|
18 |
+
asr = pipeline("automatic-speech-recognition", model="jonatasgrosman/wav2vec2-xls-r-1b-spanish")
|
19 |
|
20 |
|
21 |
|
|
|
37 |
|
38 |
description = """ This is a Gradio demo of Spanish Audio Transcriptions to Quechua Translation. To use this, simply provide an audio input (audio recording or via microphone), which will subsequently be transcribed and translated to the Quechua language.
|
39 |
|
40 |
+
Pre-trained model used for Spanish ASR: [jonatasgrosman/wav2vec2-xls-r-1b-spanish](https://huggingface.co/jonatasgrosman/wav2vec2-xls-r-1b-spanish)
|
41 |
|
42 |
Pre-trained model used for translating Spanish audio transcription to the Quechua language: [t5-small-finetuned-spanish-to-quechua](https://huggingface.co/hackathon-pln-es/t5-small-finetuned-spanish-to-quechua)
|
43 |
|