Spaces:
Runtime error
Runtime error
Update backend.py
Browse files- backend.py +1 -4
backend.py
CHANGED
|
@@ -30,8 +30,5 @@ def text_to_speech(text):
|
|
| 30 |
inputs = tokenizer_tts(text, return_tensors="pt").to(model_tts.device)
|
| 31 |
with torch.no_grad():
|
| 32 |
audio = model_tts(**inputs).waveform.squeeze().cpu().numpy()
|
| 33 |
-
buffer = io.BytesIO()
|
| 34 |
sampling_rate = model_tts.config.sampling_rate
|
| 35 |
-
|
| 36 |
-
buffer.seek(0)
|
| 37 |
-
return sampling_rate, buffer
|
|
|
|
| 30 |
inputs = tokenizer_tts(text, return_tensors="pt").to(model_tts.device)
|
| 31 |
with torch.no_grad():
|
| 32 |
audio = model_tts(**inputs).waveform.squeeze().cpu().numpy()
|
|
|
|
| 33 |
sampling_rate = model_tts.config.sampling_rate
|
| 34 |
+
return sampling_rate, audio
|
|
|
|
|
|