Spaces:
Running
Running
Commit
·
d90d592
1
Parent(s):
2249567
add debug log
Browse files
app.py
CHANGED
|
@@ -665,7 +665,7 @@ def generate_tts():
|
|
| 665 |
# --- Cache Miss: Local File Cache ---
|
| 666 |
# 对于预置文本和预置prompt,检查本地缓存
|
| 667 |
if text in predefined_texts and prompt_md5 in predefined_prompts.values():
|
| 668 |
-
app.logger.warning(f"TTS Cache MISS for: '{text[:50]}...'.
|
| 669 |
available_models = Model.query.filter_by(
|
| 670 |
model_type=ModelType.TTS, is_active=True
|
| 671 |
).all()
|
|
@@ -678,6 +678,7 @@ def generate_tts():
|
|
| 678 |
invalid_models = []
|
| 679 |
for model in candidate_models:
|
| 680 |
audio_path = find_cached_audio(model.name, text, prompt_audio_path=reference_audio_path)
|
|
|
|
| 681 |
if audio_path and os.path.exists(audio_path):
|
| 682 |
valid_models.append(model)
|
| 683 |
else:
|
|
|
|
| 665 |
# --- Cache Miss: Local File Cache ---
|
| 666 |
# 对于预置文本和预置prompt,检查本地缓存
|
| 667 |
if text in predefined_texts and prompt_md5 in predefined_prompts.values():
|
| 668 |
+
app.logger.warning(f"TTS Cache MISS for: '{text[:50]}...'. Finding in local cache.")
|
| 669 |
available_models = Model.query.filter_by(
|
| 670 |
model_type=ModelType.TTS, is_active=True
|
| 671 |
).all()
|
|
|
|
| 678 |
invalid_models = []
|
| 679 |
for model in candidate_models:
|
| 680 |
audio_path = find_cached_audio(model.name, text, prompt_audio_path=reference_audio_path)
|
| 681 |
+
app.logger.warning(f"Checking cached audio for model {model.name}: {audio_path}")
|
| 682 |
if audio_path and os.path.exists(audio_path):
|
| 683 |
valid_models.append(model)
|
| 684 |
else:
|