Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ import numpy as np
|
|
5 |
|
6 |
# Load the MMS-TTS model and processor for Tibetan (bod)
|
7 |
model_id = "ganga4364/mms-tts-bod-female" # Replace with your fine-tuned model if necessary
|
8 |
-
|
9 |
-
model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id)
|
10 |
|
11 |
# Use the text-to-speech pipeline with the model
|
12 |
-
synthesiser = pipeline("text-to-speech",
|
|
|
13 |
|
14 |
# Function to perform TTS inference and save audio to a file
|
15 |
def generate_audio(input_text):
|
|
|
5 |
|
6 |
# Load the MMS-TTS model and processor for Tibetan (bod)
|
7 |
model_id = "ganga4364/mms-tts-bod-female" # Replace with your fine-tuned model if necessary
|
8 |
+
|
|
|
9 |
|
10 |
# Use the text-to-speech pipeline with the model
|
11 |
+
synthesiser = pipeline("text-to-speech", model_id) # add device=0 if you want to use a GPU
|
12 |
+
|
13 |
|
14 |
# Function to perform TTS inference and save audio to a file
|
15 |
def generate_audio(input_text):
|