From 8beb2dca7ac54cc021b4a59b612999105af51177 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 6 Aug 2024 15:11:07 +0800 Subject: [PATCH] bugfix --- app/tts.py | 4 +++- conf/config.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/tts.py b/app/tts.py index aa2c6d5..9e97c66 100644 --- a/app/tts.py +++ b/app/tts.py @@ -15,7 +15,9 @@ __version__ = '0.0.1' class TTS: def __init__(self): self.engine = ChatTTS.Chat() - self.engine.load(compile=True) + self.engine.load(source='custom', + custom_path=get_definition(custom_path='chattts_model_path', + compile=True) def _generate(request, **kw): params_kw = kw.get('params_kw') diff --git a/conf/config.json b/conf/config.json index ab34fa9..67074d3 100755 --- a/conf/config.json +++ b/conf/config.json @@ -5,7 +5,7 @@ "logfile":"$[workdir]$/logs/tts.log" }, "definitions":{ - "whisper_model":"/d/ymq/osc/models/whisper/large-v3.pt" + "chattts_model_path":"/d/ymq/osc/models/ChaTTTS" }, "filesroot":"$[workdir]$/files", "website":{