mirror of https://github.com/coqui-ai/TTS.git
new mozilla preprocessor
This commit is contained in:
parent
e62659da94
commit
1654a725a7
|
@ -29,7 +29,7 @@ def tweb(root_path, meta_file):
|
||||||
# return {'text': texts, 'wavs': wavs}
|
# return {'text': texts, 'wavs': wavs}
|
||||||
|
|
||||||
|
|
||||||
def mozilla(root_path, meta_file):
|
def mozilla_old(root_path, meta_file):
|
||||||
"""Normalizes Mozilla meta data files to TTS format"""
|
"""Normalizes Mozilla meta data files to TTS format"""
|
||||||
txt_file = os.path.join(root_path, meta_file)
|
txt_file = os.path.join(root_path, meta_file)
|
||||||
items = []
|
items = []
|
||||||
|
@ -44,6 +44,20 @@ def mozilla(root_path, meta_file):
|
||||||
return items
|
return items
|
||||||
|
|
||||||
|
|
||||||
|
def mozilla(root_path, meta_file):
|
||||||
|
"""Normalizes Mozilla meta data files to TTS format"""
|
||||||
|
txt_file = os.path.join(root_path, meta_file)
|
||||||
|
items = []
|
||||||
|
with open(txt_file, 'r') as ttf:
|
||||||
|
for line in ttf:
|
||||||
|
cols = line.split('|')
|
||||||
|
wav_file = cols[1].strip()
|
||||||
|
text = cols[0].strip()
|
||||||
|
wav_file = os.path.join(root_path, "wavs", wav_file)
|
||||||
|
items.append([text, wav_file])
|
||||||
|
return items
|
||||||
|
|
||||||
|
|
||||||
def mailabs(root_path, meta_files):
|
def mailabs(root_path, meta_files):
|
||||||
"""Normalizes M-AI-Labs meta data files to TTS format"""
|
"""Normalizes M-AI-Labs meta data files to TTS format"""
|
||||||
folders = [os.path.dirname(f.strip()) for f in meta_files.split(",")]
|
folders = [os.path.dirname(f.strip()) for f in meta_files.split(",")]
|
||||||
|
|
Loading…
Reference in New Issue