mirror of https://github.com/coqui-ai/TTS.git
Merge branch 'dev' of github.com:mozilla/TTS into dev
commit
d5cefe0546
|
@ -70,7 +70,7 @@ def mozilla(root_path, meta_file):
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|
||||||
def mailabs(root_path, meta_files):
|
def mailabs(root_path, meta_files=None):
|
||||||
"""Normalizes M-AI-Labs meta data files to TTS format"""
|
"""Normalizes M-AI-Labs meta data files to TTS format"""
|
||||||
speaker_regex = re.compile("by_book/(male|female|mix)/(?P<speaker_name>[^/]+)/")
|
speaker_regex = re.compile("by_book/(male|female|mix)/(?P<speaker_name>[^/]+)/")
|
||||||
if meta_files is None:
|
if meta_files is None:
|
||||||
|
@ -164,4 +164,4 @@ def libri_tts(root_path, meta_files=None):
|
||||||
items.append([text, wav_file, speaker_name])
|
items.append([text, wav_file, speaker_name])
|
||||||
for item in items:
|
for item in items:
|
||||||
assert os.path.exists(item[1]), f" [!] wav file is not exist - {item[1]}"
|
assert os.path.exists(item[1]), f" [!] wav file is not exist - {item[1]}"
|
||||||
return items
|
return items
|
||||||
|
|
|
@ -108,7 +108,7 @@ def synthesis(model,
|
||||||
# preprocess the given text
|
# preprocess the given text
|
||||||
inputs = text_to_seqvec(text, CONFIG, use_cuda)
|
inputs = text_to_seqvec(text, CONFIG, use_cuda)
|
||||||
speaker_id = id_to_torch(speaker_id)
|
speaker_id = id_to_torch(speaker_id)
|
||||||
if use_cuda:
|
if speaker_id is not None and use_cuda:
|
||||||
speaker_id = speaker_id.cuda()
|
speaker_id = speaker_id.cuda()
|
||||||
# synthesize voice
|
# synthesize voice
|
||||||
decoder_output, postnet_output, alignments, stop_tokens = run_model(
|
decoder_output, postnet_output, alignments, stop_tokens = run_model(
|
||||||
|
|
Loading…
Reference in New Issue