Update tts.py
Browse files
tts.py
CHANGED
@@ -7,7 +7,6 @@ model = SpeechT5ForTextToSpeech.from_pretrained(MODEL_ID)
|
|
7 |
|
8 |
def synthesize_speech(text):
|
9 |
inputs = processor(text, return_tensors="pt")
|
10 |
-
# Set device
|
11 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
12 |
model.to(device)
|
13 |
inputs = inputs.to(device)
|
|
|
7 |
|
8 |
def synthesize_speech(text):
|
9 |
inputs = processor(text, return_tensors="pt")
|
|
|
10 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
11 |
model.to(device)
|
12 |
inputs = inputs.to(device)
|