Update app.py
Browse files
app.py
CHANGED
@@ -2,11 +2,12 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from transformers import pipeline
|
4 |
|
|
|
5 |
# Laden der Modelle (einmalig beim Start)
|
6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
7 |
|
8 |
-
speech_to_text = pipeline("automatic-speech-recognition", model="openai/whisper-
|
9 |
-
text_to_speech = pipeline("text-to-speech", model="facebook/
|
10 |
|
11 |
def audio_to_audio_chatbot(audio):
|
12 |
if audio is None:
|
@@ -34,4 +35,5 @@ if __name__ == "__main__":
|
|
34 |
live=True # Aktiviert Streaming
|
35 |
)
|
36 |
|
37 |
-
iface.launch()
|
|
|
|
2 |
import torch
|
3 |
from transformers import pipeline
|
4 |
|
5 |
+
|
6 |
# Laden der Modelle (einmalig beim Start)
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
+
speech_to_text = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo", device=device)
|
10 |
+
text_to_speech = pipeline("text-to-speech", model="facebook/seamless-streaming", device=device)
|
11 |
|
12 |
def audio_to_audio_chatbot(audio):
|
13 |
if audio is None:
|
|
|
35 |
live=True # Aktiviert Streaming
|
36 |
)
|
37 |
|
38 |
+
iface.launch()", device=device)
|
39 |
+
|