mirror of https://github.com/coqui-ai/TTS.git
update imports for `formatters`
This commit is contained in:
parent
6c495c6a6e
commit
ef4ea9e527
|
@ -80,7 +80,7 @@ Example run:
|
||||||
model.eval()
|
model.eval()
|
||||||
|
|
||||||
# data loader
|
# data loader
|
||||||
preprocessor = importlib.import_module("TTS.tts.datasets.preprocess")
|
preprocessor = importlib.import_module("TTS.tts.datasets.formatters")
|
||||||
preprocessor = getattr(preprocessor, args.dataset)
|
preprocessor = getattr(preprocessor, args.dataset)
|
||||||
meta_data = preprocessor(args.data_path, args.dataset_metafile)
|
meta_data = preprocessor(args.data_path, args.dataset_metafile)
|
||||||
dataset = TTSDataset(
|
dataset = TTSDataset(
|
||||||
|
|
|
@ -3,14 +3,14 @@ import argparse
|
||||||
import os
|
import os
|
||||||
from argparse import RawTextHelpFormatter
|
from argparse import RawTextHelpFormatter
|
||||||
|
|
||||||
from TTS.tts.datasets.preprocess import get_preprocessor_by_name
|
from TTS.tts.datasets.formatters import get_preprocessor_by_name
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# pylint: disable=bad-option-value
|
# pylint: disable=bad-option-value
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="""Find all the unique characters or phonemes in a dataset.\n\n"""
|
description="""Find all the unique characters or phonemes in a dataset.\n\n"""
|
||||||
"""Target dataset must be defined in TTS.tts.datasets.preprocess\n\n"""
|
"""Target dataset must be defined in TTS.tts.datasets.formatters\n\n"""
|
||||||
"""
|
"""
|
||||||
Example runs:
|
Example runs:
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--dataset", type=str, default="", help="One of the target dataset names in TTS.tts.datasets.preprocess."
|
"--dataset", type=str, default="", help="One of the target dataset names in TTS.tts.datasets.formatters."
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument("--meta_file", type=str, default=None, help="Path to the transcriptions file of the dataset.")
|
parser.add_argument("--meta_file", type=str, default=None, help="Path to the transcriptions file of the dataset.")
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"from multiprocessing import Pool\n",
|
"from multiprocessing import Pool\n",
|
||||||
"from matplotlib import pylab as plt\n",
|
"from matplotlib import pylab as plt\n",
|
||||||
"from collections import Counter\n",
|
"from collections import Counter\n",
|
||||||
"from TTS.tts.datasets.preprocess import *\n",
|
"from TTS.tts.datasets.formatters import *\n",
|
||||||
"%matplotlib inline"
|
"%matplotlib inline"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"# import stuff\n",
|
"# import stuff\n",
|
||||||
"from TTS.utils.io import load_config\n",
|
"from TTS.utils.io import load_config\n",
|
||||||
"from TTS.tts.datasets.preprocess import load_meta_data\n",
|
"from TTS.tts.datasets.formatters import load_meta_data\n",
|
||||||
"from TTS.tts.utils.text import phoneme_to_sequence, sequence_to_phoneme\n",
|
"from TTS.tts.utils.text import phoneme_to_sequence, sequence_to_phoneme\n",
|
||||||
"from tqdm import tqdm\n",
|
"from tqdm import tqdm\n",
|
||||||
"from matplotlib import pylab as plt\n",
|
"from matplotlib import pylab as plt\n",
|
||||||
|
|
|
@ -2,7 +2,7 @@ import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from tests import get_tests_input_path
|
from tests import get_tests_input_path
|
||||||
from TTS.tts.datasets.preprocess import common_voice
|
from TTS.tts.datasets.formatters import common_voice
|
||||||
|
|
||||||
|
|
||||||
class TestPreprocessors(unittest.TestCase):
|
class TestPreprocessors(unittest.TestCase):
|
||||||
|
|
|
@ -9,7 +9,7 @@ from torch.utils.data import DataLoader
|
||||||
from tests import get_tests_output_path
|
from tests import get_tests_output_path
|
||||||
from TTS.tts.configs import BaseTTSConfig
|
from TTS.tts.configs import BaseTTSConfig
|
||||||
from TTS.tts.datasets import TTSDataset
|
from TTS.tts.datasets import TTSDataset
|
||||||
from TTS.tts.datasets.preprocess import ljspeech
|
from TTS.tts.datasets.formatters import ljspeech
|
||||||
from TTS.utils.audio import AudioProcessor
|
from TTS.utils.audio import AudioProcessor
|
||||||
|
|
||||||
# pylint: disable=unused-variable
|
# pylint: disable=unused-variable
|
||||||
|
|
Loading…
Reference in New Issue