mirror of https://github.com/coqui-ai/TTS.git
Lint fixs
This commit is contained in:
parent
85418ffeaa
commit
45d0b04179
|
@ -7,7 +7,7 @@ from tqdm.contrib.concurrent import process_map
|
|||
|
||||
from TTS.config import load_config
|
||||
from TTS.tts.datasets import load_tts_samples
|
||||
from TTS.tts.utils.text import text2phone, phoneme_to_sequence
|
||||
from TTS.tts.utils.text import text2phone
|
||||
|
||||
|
||||
def compute_phonemes(item):
|
||||
|
@ -19,8 +19,8 @@ def compute_phonemes(item):
|
|||
return []
|
||||
return list(set(ph))
|
||||
|
||||
|
||||
def main():
|
||||
# pylint: disable=W0601
|
||||
global c
|
||||
# pylint: disable=bad-option-value
|
||||
parser = argparse.ArgumentParser(
|
||||
|
|
|
@ -176,6 +176,7 @@ class ResNetSpeakerEncoder(nn.Module):
|
|||
def forward(self, x, l2_norm=False):
|
||||
with torch.no_grad():
|
||||
with torch.cuda.amp.autocast(enabled=False):
|
||||
# if you torch spec compute it otherwise use the mel spec computed by the AP
|
||||
if self.use_torch_spec:
|
||||
x = self.torch_spec(x)
|
||||
else:
|
||||
|
|
|
@ -154,6 +154,6 @@ class VitsConfig(BaseTTSConfig):
|
|||
d_vector_dim: int = None
|
||||
|
||||
def __post_init__(self):
|
||||
for key in self.model_args.keys():
|
||||
for key, val in self.model_args.items():
|
||||
if hasattr(self, key):
|
||||
self[key] = self.model_args[key]
|
||||
self[key] = val
|
||||
|
|
|
@ -139,4 +139,4 @@ def get_vad_speech_segments(audio, sample_rate, aggressiveness=2, padding_durati
|
|||
frames = list(frame_generator(30, audio, sample_rate))
|
||||
segments = vad_collector(sample_rate, 30, padding_duration_ms, vad, frames)
|
||||
|
||||
return segments
|
||||
return segments
|
||||
|
|
Loading…
Reference in New Issue