diff --git a/ovos_tts_plugin_mimic3/__init__.py b/ovos_tts_plugin_mimic3/__init__.py index 565b179..174e0aa 100644 --- a/ovos_tts_plugin_mimic3/__init__.py +++ b/ovos_tts_plugin_mimic3/__init__.py @@ -2,13 +2,12 @@ import re import typing import wave -from os.path import join -from pathlib import Path -from threading import Lock - from mimic3_tts import AudioResult, Mimic3Settings, Mimic3TextToSpeechSystem, SSMLSpeaker +from os.path import join from ovos_plugin_manager.tts import TTS from ovos_utils.xdg_utils import xdg_data_home +from pathlib import Path +from threading import Lock from ovos_utils.log import LOG @@ -36,23 +35,6 @@ class Mimic3TTSPlugin(TTS): def __init__(self, lang="en-us", config=None): ssml_tags = ["speak", "s", "w", "voice", "prosody", "say-as", "break", "sub", "phoneme"] - config = config or {} - voice = config.get("voice") - speaker = config.get("speaker") - if not voice: - if lang not in self.default_voices: - lang = lang.split("-")[0] - if lang in self.default_voices: - voice = self.default_voices[lang] - config["voice"] = voice - else: - LOG.warning("Default mimic3 voice not set!") - - if voice and not speaker: - if "#" in voice: - voice, speaker = voice.split("#") - config["voice"] = voice - config["speaker"] = speaker super().__init__(lang, config, ssml_tags=ssml_tags) self.speaker = self.config.get("speaker") self.lock = Lock()