Downloads · 30 days
0
tensorspeech/tts-fastspeech2-kss-ko
tts-fastspeech2-kss-ko is a text-to-speech model from tensorspeech. Use it when you need text read aloud. It is set up for tensorflowtts. The card lists the license as apache-2.0.
This repository provides a pretrained FastSpeech2 trained on KSS dataset (Ko). For a detail of the model, we encourage you to read more about TensorFlowTTS.
Downloads · 30 days
0
Access
Public
Updated Jun 11, 2021
Repo size
125 MB
Likes
8
Public
Click a slice to open those files.
.h5125 MB · 100%
From the Hugging Face model README
This repository provides a pretrained FastSpeech2 trained on KSS dataset (Ko). For a detail of the model, we encourage you to read more about TensorFlowTTS.
First of all, please install TensorFlowTTS with the following command:
pip install TensorFlowTTS
import numpy as np
import soundfile as sf
import yaml
import tensorflow as tf
from tensorflow_tts.inference import AutoProcessor
from tensorflow_tts.inference import TFAutoModel
processor = AutoProcessor.from_pretrained("tensorspeech/tts-fastspeech2-kss-ko")
fastspeech2 = TFAutoModel.from_pretrained("tensorspeech/tts-fastspeech2-kss-ko")
text = "신은 우리의 수학 문제에는 관심이 없다. 신은 다만 경험적으로 통합할 뿐이다."
input_ids = processor.text_to_sequence(text)
mel_before, mel_after, duration_outputs, _, _ = fastspeech2.inference(
input_ids=tf.expand_dims(tf.convert_to_tensor(input_ids, dtype=tf.int32), 0),
speaker_ids=tf.convert_to_tensor([0], dtype=tf.int32),
speed_ratios=tf.convert_to_tensor([1.0], dtype=tf.float32),
f0_ratios =tf.convert_to_tensor([1.0], dtype=tf.float32),
energy_ratios =tf.convert_to_tensor([1.0], dtype=tf.float32),
)
@misc{ren2021fastspeech,
title={FastSpeech 2: Fast and High-Quality End-to-End Text to Speech},
author={Yi Ren and Chenxu Hu and Xu Tan and Tao Qin and Sheng Zhao and Zhou Zhao and Tie-Yan Liu},
year={2021},
eprint={2006.04558},
archivePrefix={arXiv},
primaryClass={eess.AS}
}
@misc{TFTTS,
author = {Minh Nguyen, Alejandro Miguel Velasquez, Erogol, Kuan Chen, Dawid Kobus, Takuya Ebata,
Trinh Le and Yunchao He},
title = {TensorflowTTS},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\\url{https://github.com/TensorSpeech/TensorFlowTTS}},
}