Skip to content

Commit

Permalink
[vocos] Update config.json (#187)
Browse files Browse the repository at this point in the history
Co-authored-by: 李盛强 <lichengqiang@lichengqiangdeMacBook-Pro.local>
  • Loading branch information
Shengqiang-Li and 李盛强 authored Jan 12, 2024
1 parent c636465 commit ca9a68e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/baker/configs/vits2_vocos_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"filter_length": 1024,
"hop_length": 256,
"win_length": 1024,
"n_mel_channels": 80,
"n_mel_channels": 100,
"mel_fmin": 0.0,
"mel_fmax": null
},
Expand Down
3 changes: 0 additions & 3 deletions wetts/vits/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
def __init__(self, audiopaths_sid_text, hparams):
self.audiopaths_sid_text = load_filepaths_and_text(audiopaths_sid_text)
self.max_wav_value = hparams.max_wav_value
self.sampling_rate = hparams.sampling_rate
self.filter_length = hparams.filter_length
self.hop_length = hparams.hop_length
self.win_length = hparams.win_length
Expand Down Expand Up @@ -125,8 +124,6 @@ def get_audio(self, filename):
self.sampling_rate,
self.hop_length,
self.win_length,
self.mel_fmin,
self.mel_fmax,
center=False,
)
spec = torch.squeeze(spec, 0)
Expand Down
2 changes: 1 addition & 1 deletion wetts/vits/export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main():
if ("use_mel_posterior_encoder" in hps.model.keys()
and hps.model.use_mel_posterior_encoder):
print("Using mel posterior encoder for VITS2")
posterior_channels = 80 # vits2
posterior_channels = hps.data.n_mel_channels # vits2
hps.data.use_mel_posterior_encoder = True
else:
print("Using lin posterior encoder for VITS1")
Expand Down
2 changes: 1 addition & 1 deletion wetts/vits/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main():
if ("use_mel_posterior_encoder" in hps.model.keys()
and hps.model.use_mel_posterior_encoder):
print("Using mel posterior encoder for VITS2")
posterior_channels = 80 # vits2
posterior_channels = hps.data.n_mel_channels # vits2
net_g = SynthesizerTrn(len(phone_dict),
posterior_channels,
hps.train.segment_size // hps.data.hop_length,
Expand Down
2 changes: 1 addition & 1 deletion wetts/vits/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def main():
if ("use_mel_posterior_encoder" in hps.model.keys()
and hps.model.use_mel_posterior_encoder):
print("Using mel posterior encoder for VITS2")
posterior_channels = 80 # vits2
posterior_channels = hps.data.n_mel_channels # vits2
hps.data.use_mel_posterior_encoder = True
else:
print("Using lin posterior encoder for VITS1")
Expand Down

0 comments on commit ca9a68e

Please sign in to comment.