Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
import torch
|
2 |
from transformers import pipeline
|
3 |
from datasets import load_dataset
|
|
|
4 |
from transformers import SpeechT5Processor, Speech2Text2Speech, SpeechT5HifiGan
|
5 |
import numpy as np
|
6 |
import gradio as gr
|
7 |
|
8 |
# Configurar el pipeline de reconocimiento autom谩tico de voz
|
9 |
-
pipe = pipeline(
|
10 |
-
|
11 |
-
)
|
12 |
|
13 |
# Funci贸n para traducir texto
|
14 |
def translate(audio):
|
@@ -17,7 +17,7 @@ def translate(audio):
|
|
17 |
|
18 |
# Cargar el procesador y el modelo de SpeechT5
|
19 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
20 |
-
model =
|
21 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
22 |
|
23 |
# Cargar los datos de embeddings del hablante
|
|
|
1 |
import torch
|
2 |
from transformers import pipeline
|
3 |
from datasets import load_dataset
|
4 |
+
from transformers import AutoModel
|
5 |
from transformers import SpeechT5Processor, Speech2Text2Speech, SpeechT5HifiGan
|
6 |
import numpy as np
|
7 |
import gradio as gr
|
8 |
|
9 |
# Configurar el pipeline de reconocimiento autom谩tico de voz
|
10 |
+
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-base")
|
11 |
+
# Load model directly
|
|
|
12 |
|
13 |
# Funci贸n para traducir texto
|
14 |
def translate(audio):
|
|
|
17 |
|
18 |
# Cargar el procesador y el modelo de SpeechT5
|
19 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
20 |
+
model = AutoModel.from_pretrained("gitgato/mabama")
|
21 |
vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
|
22 |
|
23 |
# Cargar los datos de embeddings del hablante
|