Spaces:
Build error
Build error
load a lighter model and check
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import torch
|
|
| 5 |
# Load lightweight models
|
| 6 |
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
|
| 7 |
translator = pipeline("translation", model="facebook/m2m100_418M")
|
| 8 |
-
tts = pipeline("text-to-speech", model="
|
| 9 |
|
| 10 |
# Function to handle transcription, translation, and TTS
|
| 11 |
def process_audio(audio, target_lang):
|
|
|
|
| 5 |
# Load lightweight models
|
| 6 |
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
|
| 7 |
translator = pipeline("translation", model="facebook/m2m100_418M")
|
| 8 |
+
tts = pipeline("text-to-speech", model="microsoft/speecht5_tts", device=torch.device('cpu'))
|
| 9 |
|
| 10 |
# Function to handle transcription, translation, and TTS
|
| 11 |
def process_audio(audio, target_lang):
|