Update tts.py
Browse files
tts.py
CHANGED
@@ -25,6 +25,7 @@ def synthesize_speech(text):
|
|
25 |
logging.error("Text input is empty.")
|
26 |
return None
|
27 |
|
|
|
28 |
inputs = processor(text, return_tensors="pt")
|
29 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
30 |
model.to(device)
|
|
|
25 |
logging.error("Text input is empty.")
|
26 |
return None
|
27 |
|
28 |
+
# Include language code explicitly if needed
|
29 |
inputs = processor(text, return_tensors="pt")
|
30 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
31 |
model.to(device)
|