Glitche commited on
Update tts.py
Browse files
tts.py
CHANGED
|
@@ -66,12 +66,17 @@ def _get_pidgin_model():
|
|
| 66 |
return _pidgin_model, _pidgin_tokenizer
|
| 67 |
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
when the Flask app starts, so the first real request isn't slow."""
|
| 72 |
-
_get_yarngpt_model()
|
| 73 |
-
_get_pidgin_model()
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
def _generate_yarngpt_speech(text, speaker, language, temperature=0.1, repetition_penalty=1.1, max_length=4000):
|
| 77 |
"""
|
|
|
|
| 66 |
return _pidgin_model, _pidgin_tokenizer
|
| 67 |
|
| 68 |
|
| 69 |
+
# ===== DEBUG START =====
|
| 70 |
+
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
+
model = Path("/home/user/.yarngpt/models/wavtokenizer_large_speech_320_24k.ckpt")
|
| 73 |
+
print("Exists:", model.exists())
|
| 74 |
+
|
| 75 |
+
if model.exists():
|
| 76 |
+
print("Size:", model.stat().st_size)
|
| 77 |
+
with open(model, "rb") as f:
|
| 78 |
+
print("First 100 bytes:", f.read(100))
|
| 79 |
+
# ===== DEBUG END =====
|
| 80 |
|
| 81 |
def _generate_yarngpt_speech(text, speaker, language, temperature=0.1, repetition_penalty=1.1, max_length=4000):
|
| 82 |
"""
|