Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TensorSpeech
GitHub Repository: TensorSpeech/TensorFlowTTS
Path: blob/master/tensorflow_tts/configs/mb_melgan.py
1558 views
1
# -*- coding: utf-8 -*-
2
# Copyright 2020 Minh Nguyen (@dathudeptrai)
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
# http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
15
"""Multi-band MelGAN Config object."""
16
17
from tensorflow_tts.configs import MelGANDiscriminatorConfig, MelGANGeneratorConfig
18
19
20
class MultiBandMelGANGeneratorConfig(MelGANGeneratorConfig):
21
"""Initialize Multi-band MelGAN Generator Config."""
22
23
def __init__(self, **kwargs):
24
super().__init__(**kwargs)
25
self.subbands = kwargs.pop("subbands", 4)
26
self.taps = kwargs.pop("taps", 62)
27
self.cutoff_ratio = kwargs.pop("cutoff_ratio", 0.142)
28
self.beta = kwargs.pop("beta", 9.0)
29
30
31
class MultiBandMelGANDiscriminatorConfig(MelGANDiscriminatorConfig):
32
"""Initialize Multi-band MelGAN Discriminator Config."""
33
34
def __init__(self, **kwargs):
35
super().__init__(**kwargs)
36
37