Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TensorSpeech
GitHub Repository: TensorSpeech/TensorFlowTTS
Path: blob/master/tensorflow_tts/configs/fastspeech2.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
"""FastSpeech2 Config object."""
16
17
18
from tensorflow_tts.configs import FastSpeechConfig
19
20
21
class FastSpeech2Config(FastSpeechConfig):
22
"""Initialize FastSpeech2 Config."""
23
24
def __init__(
25
self,
26
variant_prediction_num_conv_layers=2,
27
variant_kernel_size=9,
28
variant_dropout_rate=0.5,
29
variant_predictor_filter=256,
30
variant_predictor_kernel_size=3,
31
variant_predictor_dropout_rate=0.5,
32
**kwargs
33
):
34
super().__init__(**kwargs)
35
self.variant_prediction_num_conv_layers = variant_prediction_num_conv_layers
36
self.variant_predictor_kernel_size = variant_predictor_kernel_size
37
self.variant_predictor_dropout_rate = variant_predictor_dropout_rate
38
self.variant_predictor_filter = variant_predictor_filter
39
40