ganga4364 commited on
Commit
d16456b
·
verified ·
1 Parent(s): 9d83d52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- processor = AutoProcessor.from_pretrained(model_id)
9
- model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id)
10
 
11
  # Use the text-to-speech pipeline with the model
12
- synthesiser = pipeline("text-to-speech", model=model, processor=processor, device=0) # Use GPU if available
 
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):