Skip to content

Commit

Permalink
Skip dummy fallback TTS, remove mimic as default fallback. (#51)
Browse files Browse the repository at this point in the history
* remove mimic as default fallback, skip fallback init if empty or same as main TTS

* added another check for empty fallback_tts
  • Loading branch information
LordIvanhoe authored Jan 26, 2024
1 parent 4f80a7f commit c47e596
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ovos_audio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ def _maybe_reload_tts(self):
self._tts_hash = config.get("module", "")

# if fallback TTS is the same as main TTS dont load it
if config.get("module", "") == config.get("fallback_module", ""):
return
if config.get("module", "") == config.get("fallback_module", "") or not config.get("fallback_module", ""):
LOG.debug("Skipping fallback TTS init, fallback is empty or same as main TTS")
return

if not config.get('preload_fallback', True):
LOG.debug("Skipping fallback TTS init")
Expand Down Expand Up @@ -354,7 +355,9 @@ def _get_tts_fallback(self):
"""Lazily initializes the fallback TTS if needed."""
if not self.fallback_tts:
config = Configuration()
engine = config.get('tts', {}).get("fallback_module", "mimic")
engine = config.get('tts', {}).get("fallback_module", "")
if not engine:
return
cfg = {"tts": {"module": engine,
engine: config.get('tts', {}).get(engine, {})}}
self.fallback_tts = TTSFactory.create(cfg)
Expand Down

0 comments on commit c47e596

Please sign in to comment.