Spaces:
Sleeping
Sleeping
- __pycache__/tts_gen.cpython-312.pyc +0 -0
- models/v2_multi.pt +3 -0
- tts_gen.py +8 -3
__pycache__/tts_gen.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/tts_gen.cpython-312.pyc and b/__pycache__/tts_gen.cpython-312.pyc differ
|
|
|
models/v2_multi.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b535773eda9c0176166e6fc5b43aa302333dfeba7a836e70487d8dcffe59a0d0
|
| 3 |
+
size 136099826
|
tts_gen.py
CHANGED
|
@@ -89,9 +89,14 @@ class TTSGenerator():
|
|
| 89 |
ssml_text = text if is_speak_xml(text) else None
|
| 90 |
plain_text = None if is_speak_xml(text) else text
|
| 91 |
|
| 92 |
-
audio = self.model.apply_tts(text=plain_text, ssml_text=ssml_text,
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
buffer = io.BytesIO()
|
| 96 |
sf.write(buffer, audio.numpy(), self.sample_rate, format='WAV')
|
| 97 |
buffer.seek(0)
|
|
|
|
| 89 |
ssml_text = text if is_speak_xml(text) else None
|
| 90 |
plain_text = None if is_speak_xml(text) else text
|
| 91 |
|
| 92 |
+
#audio = self.model.apply_tts(text=plain_text, ssml_text=ssml_text,
|
| 93 |
+
# speaker=speaker,
|
| 94 |
+
# sample_rate=self.sample_rate)
|
| 95 |
+
|
| 96 |
+
audio = self.model.apply_tts(texts=[plain_text],
|
| 97 |
+
speakers=[speaker],
|
| 98 |
+
sample_rate=self.sample_rate)
|
| 99 |
+
|
| 100 |
buffer = io.BytesIO()
|
| 101 |
sf.write(buffer, audio.numpy(), self.sample_rate, format='WAV')
|
| 102 |
buffer.seek(0)
|