Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2691 from forslund/bugfix/duration_stretch-update
Browse files Browse the repository at this point in the history
Bugfix/duration stretch update
  • Loading branch information
krisgesling committed Sep 25, 2020
2 parents ae72ebd + 37e0358 commit 1c80eab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mycroft/tts/mimic_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

from .tts import TTS, TTSValidator

config = Configuration.get().get("tts").get("mimic")
data_dir = expanduser(Configuration.get()['data_dir'])
CONFIG = Configuration.get().get("tts").get("mimic")
DATA_DIR = expanduser(Configuration.get()['data_dir'])

BIN = config.get("path",
BIN = CONFIG.get("path",
os.path.join(MYCROFT_ROOT_PATH, 'mimic', 'bin', 'mimic'))

if not os.path.isfile(BIN):
Expand All @@ -41,7 +41,7 @@

BIN = distutils.spawn.find_executable("mimic")

SUBSCRIBER_VOICES = {'trinity': join(data_dir, 'voices/mimic_tn')}
SUBSCRIBER_VOICES = {'trinity': join(DATA_DIR, 'voices/mimic_tn')}


def download_subscriber_voices(selected_voice):
Expand Down Expand Up @@ -136,9 +136,9 @@ def args(self):

args = [mimic_bin, '-voice', voice, '-psdur', '-ssml']

stretch = config.get('duration_stretch', None)
stretch = self.config.get('duration_stretch', None)
if stretch:
args += ['--setf', 'duration_stretch=' + stretch]
args += ['--setf', 'duration_stretch={}'.format(stretch)]
return args

def get_tts(self, sentence, wav_file):
Expand Down

0 comments on commit 1c80eab

Please sign in to comment.