Spaces:
Runtime error
Runtime error
Rachid Ammari
commited on
Commit
·
1320bd0
1
Parent(s):
84024ab
added italian language
Browse files- A304176327.mp3000.mp3 +0 -0
- Ansa_voice_barbero_no_sigla.mp3000.mp3 +0 -0
- app.py +6 -3
A304176327.mp3000.mp3
ADDED
Binary file (720 kB). View file
|
|
Ansa_voice_barbero_no_sigla.mp3000.mp3
ADDED
Binary file (960 kB). View file
|
|
app.py
CHANGED
@@ -6,7 +6,8 @@ import whisper
|
|
6 |
wav2vec_models = {
|
7 |
"en" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h"),
|
8 |
"fr" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-french"),
|
9 |
-
"es" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish")
|
|
|
10 |
}
|
11 |
whisper_model = whisper.load_model("base")
|
12 |
|
@@ -33,12 +34,14 @@ examples = [["en", None, "english_sentence.flac"],
|
|
33 |
["fr", None, "2022-a-Droite-un-fauteuil-pour-trois-3034044.mp3000.mp3"],
|
34 |
["fr", None, "podcast-bdl-episode-5-mix-v2.mp3000.mp3"],
|
35 |
["es", None, "momiasartesecretodelantiguoegipto-nationalgeographicespana-ivoox73191074.mp3000.mp3"],
|
36 |
-
["es", None, "millonarioscohetesrepresentaestanuev-xataka-ivoox73148634.mp3000.mp3"]
|
|
|
|
|
37 |
|
38 |
gr.Interface(
|
39 |
fn=transcribe_audio,
|
40 |
inputs=[
|
41 |
-
gr.Radio(label="Language", choices=["en", "fr", "es"], value="en"),
|
42 |
gr.Audio(source="microphone", type="filepath", optional=True),
|
43 |
gr.Audio(source="upload", type="filepath", optional=True),
|
44 |
],
|
|
|
6 |
wav2vec_models = {
|
7 |
"en" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h"),
|
8 |
"fr" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-french"),
|
9 |
+
"es" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-spanish"),
|
10 |
+
"it" : pipeline("automatic-speech-recognition", model="facebook/wav2vec2-large-xlsr-53-italian")
|
11 |
}
|
12 |
whisper_model = whisper.load_model("base")
|
13 |
|
|
|
34 |
["fr", None, "2022-a-Droite-un-fauteuil-pour-trois-3034044.mp3000.mp3"],
|
35 |
["fr", None, "podcast-bdl-episode-5-mix-v2.mp3000.mp3"],
|
36 |
["es", None, "momiasartesecretodelantiguoegipto-nationalgeographicespana-ivoox73191074.mp3000.mp3"],
|
37 |
+
["es", None, "millonarioscohetesrepresentaestanuev-xataka-ivoox73148634.mp3000.mp3"],
|
38 |
+
["it", None, "Ansa_voice_barbero_no_sigla.mp3000.mp3"],
|
39 |
+
["it", None, "A304176327.mp3000.mp3"]]
|
40 |
|
41 |
gr.Interface(
|
42 |
fn=transcribe_audio,
|
43 |
inputs=[
|
44 |
+
gr.Radio(label="Language", choices=["en", "fr", "es","it"], value="en"),
|
45 |
gr.Audio(source="microphone", type="filepath", optional=True),
|
46 |
gr.Audio(source="upload", type="filepath", optional=True),
|
47 |
],
|