Spaces:
Sleeping
Sleeping
Commit Β·
014ee4b
1
Parent(s): 6deea8f
add log
Browse files
app.py
CHANGED
|
@@ -663,7 +663,7 @@ def generate_tts():
|
|
| 663 |
# --- End Cache Check ---
|
| 664 |
|
| 665 |
# --- Cache Miss: Generate on the fly ---
|
| 666 |
-
app.logger.
|
| 667 |
available_models = Model.query.filter_by(
|
| 668 |
model_type=ModelType.TTS, is_active=True
|
| 669 |
).all()
|
|
@@ -688,6 +688,7 @@ def generate_tts():
|
|
| 688 |
and audio_b_path and os.path.exists(audio_b_path)
|
| 689 |
and not has_long_silence(audio_b_path)):
|
| 690 |
valid_pairs.append((model_a, audio_a_path, model_b, audio_b_path))
|
|
|
|
| 691 |
if not valid_pairs:
|
| 692 |
return jsonify({"error": "ζζ樑εεζͺιθΏζδΉ
εηΌεειι³ζ£ζ΅οΌζ ζ³ηζι³ι’"}), 500
|
| 693 |
|
|
|
|
| 663 |
# --- End Cache Check ---
|
| 664 |
|
| 665 |
# --- Cache Miss: Generate on the fly ---
|
| 666 |
+
app.logger.warning(f"TTS Cache MISS for: '{text[:50]}...'. Generating on the fly.")
|
| 667 |
available_models = Model.query.filter_by(
|
| 668 |
model_type=ModelType.TTS, is_active=True
|
| 669 |
).all()
|
|
|
|
| 688 |
and audio_b_path and os.path.exists(audio_b_path)
|
| 689 |
and not has_long_silence(audio_b_path)):
|
| 690 |
valid_pairs.append((model_a, audio_a_path, model_b, audio_b_path))
|
| 691 |
+
app.logger.warning(f"Found valid model pair: {model_a.name} and {model_b.name} for text '{text[:50]}...'")
|
| 692 |
if not valid_pairs:
|
| 693 |
return jsonify({"error": "ζζ樑εεζͺιθΏζδΉ
εηΌεειι³ζ£ζ΅οΌζ ζ³ηζι³ι’"}), 500
|
| 694 |
|