liumaolin
commited on
Commit
·
bd3673b
1
Parent(s):
15e98c9
Update `moyoyo.py`: add fallback for `utils` to ensure `HParams` availability in runtime.
Browse files
src/voice_dialogue/services/audio/generators/runtime/moyoyo.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import typing
|
| 2 |
from typing import Tuple
|
| 3 |
|
|
@@ -11,6 +12,14 @@ from voice_dialogue.services.audio.generators.runtime.interface import TTSInterf
|
|
| 11 |
load_third_party()
|
| 12 |
|
| 13 |
from moyoyo_tts import TTSModule, TTS_Config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
@tts_tables.register("tts_classes", "moyoyo")
|
|
|
|
| 1 |
+
import sys
|
| 2 |
import typing
|
| 3 |
from typing import Tuple
|
| 4 |
|
|
|
|
| 12 |
load_third_party()
|
| 13 |
|
| 14 |
from moyoyo_tts import TTSModule, TTS_Config
|
| 15 |
+
from moyoyo_tts.utils import HParams
|
| 16 |
+
|
| 17 |
+
if "utils" not in sys.modules:
|
| 18 |
+
class GPTSoVITSFixedUtilsModule:
|
| 19 |
+
HParams = HParams
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
sys.modules['utils'] = GPTSoVITSFixedUtilsModule
|
| 23 |
|
| 24 |
|
| 25 |
@tts_tables.register("tts_classes", "moyoyo")
|