Skip to content

Commit

Permalink
Lint fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson authored and erogol committed Dec 20, 2021
1 parent 85418ff commit 45d0b04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions TTS/bin/find_unique_phonemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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):
Expand All @@ -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(
Expand Down
1 change: 1 addition & 0 deletions TTS/speaker_encoder/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def new_parameter(self, *size):
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:
Expand Down
4 changes: 2 additions & 2 deletions TTS/tts/configs/vits_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion TTS/utils/vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 45d0b04

Please sign in to comment.