Spaces:
Runtime error
Runtime error
Delete TTS/tts.py
Browse files- TTS/tts.py +0 -15
TTS/tts.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
from TTS.api import TTS
|
| 2 |
-
|
| 3 |
-
# تحميل موديل XTTS
|
| 4 |
-
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True)
|
| 5 |
-
|
| 6 |
-
def generate_voice(text, speaker_wav_path, language="ar"):
|
| 7 |
-
output_path = "output.wav"
|
| 8 |
-
tts.tts_to_file(
|
| 9 |
-
text=text,
|
| 10 |
-
file_path=output_path,
|
| 11 |
-
speaker_wav=speaker_wav_path,
|
| 12 |
-
language=language
|
| 13 |
-
)
|
| 14 |
-
return output_path
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|