位置:首页 > 新闻资讯 > 资讯四>padmalcom/tts-tacotron2-german简介

padmalcom/tts-tacotron2-german简介

发布时间:2026-05-17 00:41:29

文章来源:www.cxwl.com

访问次数:3

padmalcom/tts-tacotron2-german简介

Text-to-Speech (TTS) with Tacotron2 trained on a custom german dataset with 12 days voice using speechbrain.
Trained for 39 epochs (english speechbrain models are trained for 750 epochs) so there is room for improvement and the model is most likely to be updated soon. The hifigan vocoder can fortunately be used language-independently.


How to use

Install speechbrain.
pip install speechbrain

Generate spectrogram (line 17) and generate wav using hifigan (line 18).
import torchaudio
from speechbrain.pretrained import Tacotron2
from speechbrain.pretrained import HIFIGAN
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
tacotron2 = Tacotron2.from_hparams(source="padmalcom/tts-tacotron2-german", savedir="tmpdir_tts")
hifi_gan = HIFIGAN.from_hparams(source="speechbrain/tts-hifigan-ljspeech", savedir="tmpdir_vocoder")
# Running the TTS
mel_output, mel_length, alignment = tacotron2.encode_text("Die Sonne schien den ganzen Tag.")
# Running Vocoder (spectrogram-to-waveform)
waveforms = hifi_gan.decode_batch(mel_output)
# Save the waverform
torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 22050)

标签:漫画下载pdf漫画下载跨境电商媒体独立站百度文库站联影音网站PanDownload其它网站

关于文章《padmalcom/tts-tacotron2-german简介》特别声明

《padmalcom/tts-tacotron2-german简介》更新日期为:2026-05-17 00:41:29;目前浏览的小伙伴达到3,初夏导航所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系