Path: blob/master/tensorflow_tts/configs/mb_melgan.py
1558 views
# -*- coding: utf-8 -*-1# Copyright 2020 Minh Nguyen (@dathudeptrai)2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14"""Multi-band MelGAN Config object."""1516from tensorflow_tts.configs import MelGANDiscriminatorConfig, MelGANGeneratorConfig171819class MultiBandMelGANGeneratorConfig(MelGANGeneratorConfig):20"""Initialize Multi-band MelGAN Generator Config."""2122def __init__(self, **kwargs):23super().__init__(**kwargs)24self.subbands = kwargs.pop("subbands", 4)25self.taps = kwargs.pop("taps", 62)26self.cutoff_ratio = kwargs.pop("cutoff_ratio", 0.142)27self.beta = kwargs.pop("beta", 9.0)282930class MultiBandMelGANDiscriminatorConfig(MelGANDiscriminatorConfig):31"""Initialize Multi-band MelGAN Discriminator Config."""3233def __init__(self, **kwargs):34super().__init__(**kwargs)353637