Skip to content

Commit

Permalink
update imports for formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
erogol committed Jun 28, 2021
1 parent 6c495c6 commit ef4ea9e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion TTS/bin/compute_attention_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
model.eval()

# data loader
preprocessor = importlib.import_module("TTS.tts.datasets.preprocess")
preprocessor = importlib.import_module("TTS.tts.datasets.formatters")
preprocessor = getattr(preprocessor, args.dataset)
meta_data = preprocessor(args.data_path, args.dataset_metafile)
dataset = TTSDataset(
Expand Down
6 changes: 3 additions & 3 deletions TTS/bin/find_unique_chars.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import os
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():
# pylint: disable=bad-option-value
parser = argparse.ArgumentParser(
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:
Expand All @@ -20,7 +20,7 @@ def main():
)

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.")
Expand Down
2 changes: 1 addition & 1 deletion notebooks/dataset_analysis/AnalyzeDataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"from multiprocessing import Pool\n",
"from matplotlib import pylab as plt\n",
"from collections import Counter\n",
"from TTS.tts.datasets.preprocess import *\n",
"from TTS.tts.datasets.formatters import *\n",
"%matplotlib inline"
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/dataset_analysis/PhonemeCoverage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"source": [
"# import stuff\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 tqdm import tqdm\n",
"from matplotlib import pylab as plt\n",
Expand Down
2 changes: 1 addition & 1 deletion tests/data_tests/test_dataset_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

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):
Expand Down
2 changes: 1 addition & 1 deletion tests/data_tests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tests import get_tests_output_path
from TTS.tts.configs import BaseTTSConfig
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

# pylint: disable=unused-variable
Expand Down

0 comments on commit ef4ea9e

Please sign in to comment.