Path: blob/master/tensorflow_tts/configs/fastspeech2.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"""FastSpeech2 Config object."""151617from tensorflow_tts.configs import FastSpeechConfig181920class FastSpeech2Config(FastSpeechConfig):21"""Initialize FastSpeech2 Config."""2223def __init__(24self,25variant_prediction_num_conv_layers=2,26variant_kernel_size=9,27variant_dropout_rate=0.5,28variant_predictor_filter=256,29variant_predictor_kernel_size=3,30variant_predictor_dropout_rate=0.5,31**kwargs32):33super().__init__(**kwargs)34self.variant_prediction_num_conv_layers = variant_prediction_num_conv_layers35self.variant_predictor_kernel_size = variant_predictor_kernel_size36self.variant_predictor_dropout_rate = variant_predictor_dropout_rate37self.variant_predictor_filter = variant_predictor_filter383940