Spaces:
Sleeping
Sleeping
EloiCampeny
commited on
Commit
•
de5b215
1
Parent(s):
f2be7cd
whisper-small
Browse filesTrying whisper-small
app.py
CHANGED
@@ -1,13 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
model_name = "facebook/wav2vec2-large-xlsr-53-spanish"
|
6 |
-
model = AutoModelForCTC.from_pretrained(model_name)
|
7 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
-
|
9 |
-
# Create the ASR pipeline
|
10 |
-
trans = pipeline("automatic-speech-recognition", model=model, tokenizer=tokenizer)
|
11 |
|
12 |
|
13 |
def audio2text(audio):
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
trans = pipeline("automatic-speech-recognition", model = "openai/whisper-small")
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
def audio2text(audio):
|