johnbridges commited on
Commit
dfd8eb9
·
1 Parent(s): ca7d138

Use tiny-voca settings in cache key

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -851,6 +851,11 @@ def generate_audio():
851
  text_for_tts = text if kokoro_tts_mode == "piper" else preprocess_all(text)
852
  if kokoro_tts_mode == "piper":
853
  cache_fingerprint = f"mode=piper|model={PIPER_MODEL_PATH}|config={PIPER_CONFIG_PATH}|speaker={KOKORO_SPEAKER_ID}"
 
 
 
 
 
854
  elif kokoro_tts_mode == "legacy":
855
  cache_fingerprint = f"mode=legacy|voice={voice_name}"
856
  else:
 
851
  text_for_tts = text if kokoro_tts_mode == "piper" else preprocess_all(text)
852
  if kokoro_tts_mode == "piper":
853
  cache_fingerprint = f"mode=piper|model={PIPER_MODEL_PATH}|config={PIPER_CONFIG_PATH}|speaker={KOKORO_SPEAKER_ID}"
854
+ elif kokoro_tts_mode == "tiny-voca":
855
+ cache_fingerprint = (
856
+ f"mode=tiny-voca|repo={TINY_VOCA_REPO_ID}|voice={TINY_VOCA_VOICE}|"
857
+ f"speed={TINY_VOCA_SPEED}|pitch={TINY_VOCA_PITCH_SHIFT}|range={TINY_VOCA_PITCH_RANGE}"
858
+ )
859
  elif kokoro_tts_mode == "legacy":
860
  cache_fingerprint = f"mode=legacy|voice={voice_name}"
861
  else: