mirror of https://github.com/coqui-ai/TTS.git
Fix imports
This commit is contained in:
parent
16b70be0dd
commit
9f23ad6a0f
|
@ -6,7 +6,6 @@ import torch
|
|||
from coqpit import Coqpit
|
||||
from torch import nn
|
||||
|
||||
from TTS.utils.audio import AudioProcessor
|
||||
|
||||
# pylint: skip-file
|
||||
|
||||
|
@ -81,7 +80,7 @@ class BaseModel(nn.Module, ABC):
|
|||
...
|
||||
return outputs_dict, loss_dict
|
||||
|
||||
def train_log(self, batch: Dict, outputs: Dict, logger: "Logger", assets: Dict, steps: int) -> None:
|
||||
def train_log(self, batch: Dict, outputs: Dict, logger: "Logger", assets:Dict, steps:int) -> None:
|
||||
"""Create visualizations and waveform examples for training.
|
||||
|
||||
For example, here you can plot spectrograms and generate sample sample waveforms from these spectrograms to
|
||||
|
@ -114,7 +113,7 @@ class BaseModel(nn.Module, ABC):
|
|||
...
|
||||
return outputs_dict, loss_dict
|
||||
|
||||
def eval_log(self, batch: Dict, outputs: Dict, logger: "Logger", assets: Dict, steps: int) -> None:
|
||||
def eval_log(self, batch: Dict, outputs: Dict, logger: "Logger", assets:Dict, steps:int) -> None:
|
||||
"""The same as `train_log()`"""
|
||||
pass
|
||||
|
||||
|
|
|
@ -308,14 +308,14 @@ def mls(root_path, meta_files=None):
|
|||
# ======================================== VOX CELEB ===========================================
|
||||
def voxceleb2(root_path, meta_file=None):
|
||||
"""
|
||||
:param meta_file Used only for consistency with load_meta_data api
|
||||
:param meta_file Used only for consistency with load_tts_samples api
|
||||
"""
|
||||
return _voxcel_x(root_path, meta_file, voxcel_idx="2")
|
||||
|
||||
|
||||
def voxceleb1(root_path, meta_file=None):
|
||||
"""
|
||||
:param meta_file Used only for consistency with load_meta_data api
|
||||
:param meta_file Used only for consistency with load_tts_samples api
|
||||
"""
|
||||
return _voxcel_x(root_path, meta_file, voxcel_idx="1")
|
||||
|
||||
|
|
|
@ -110,10 +110,10 @@ class SpeakerManager:
|
|||
|
||||
@staticmethod
|
||||
def parse_speakers_from_data(items: list) -> Tuple[Dict, int]:
|
||||
"""Parse speaker IDs from data samples retured by `load_meta_data()`.
|
||||
"""Parse speaker IDs from data samples retured by `load_tts_samples()`.
|
||||
|
||||
Args:
|
||||
items (list): Data sampled returned by `load_meta_data()`.
|
||||
items (list): Data sampled returned by `load_tts_samples()`.
|
||||
|
||||
Returns:
|
||||
Tuple[Dict, int]: speaker IDs and number of speakers.
|
||||
|
@ -127,7 +127,7 @@ class SpeakerManager:
|
|||
"""Set speaker IDs from data samples.
|
||||
|
||||
Args:
|
||||
items (List): Data sampled returned by `load_meta_data()`.
|
||||
items (List): Data sampled returned by `load_tts_samples()`.
|
||||
"""
|
||||
self.speaker_ids, _ = self.parse_speakers_from_data(items)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ from torch.utils.data import Dataset
|
|||
|
||||
from TTS.utils.audio import AudioProcessor
|
||||
from TTS.vocoder.datasets.gan_dataset import GANDataset
|
||||
from TTS.vocoder.datasets.preprocess import load_wav_data, load_wav_feat_data
|
||||
from TTS.vocoder.datasets.wavegrad_dataset import WaveGradDataset
|
||||
from TTS.vocoder.datasets.wavernn_dataset import WaveRNNDataset
|
||||
|
||||
|
|
Loading…
Reference in New Issue