Sunbird AI Text-to-Speech (TTS) model trained on Luganda text
Text-to-Speech (TTS) with Tacotron2 trained on Professional Studio Recordings
This repository provides all the necessary tools for Text-to-Speech (TTS) with SpeechBrain.
The pre-trained model takes in input a short text and produces a spectrogram in output. One can get the final waveform by applying a vocoder (e.g., HiFIGAN) on top of the generated spectrogram.
Install SpeechBrain
pip install speechbrain
Perform Text-to-Speech (TTS)
import torchaudio
from speechbrain.pretrained import Tacotron2
from speechbrain.pretrained import HIFIGAN
# Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
tacotron2 = Tacotron2.from_hparams(source="/Sunbird/sunbird-lug-tts", 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("Mbagaliza Christmass Enungi Nomwaka Omugya Gubaberere Gwamirembe")
# Running Vocoder (spectrogram-to-waveform)
waveforms = hifi_gan.decode_batch(mel_output)
# Save the waverform
torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 22050)
If you want to generate multiple sentences in one-shot, you can do in this way:
tts-tacotron2-lug huggingface.co is an AI model on huggingface.co that provides tts-tacotron2-lug's model effect (), which can be used instantly with this Sunbird tts-tacotron2-lug model. huggingface.co supports a free trial of the tts-tacotron2-lug model, and also provides paid use of the tts-tacotron2-lug. Support call tts-tacotron2-lug model through api, including Node.js, Python, http.
tts-tacotron2-lug huggingface.co is an online trial and call api platform, which integrates tts-tacotron2-lug's modeling effects, including api services, and provides a free online trial of tts-tacotron2-lug, you can try tts-tacotron2-lug online for free by clicking the link below.
Sunbird tts-tacotron2-lug online free url in huggingface.co:
tts-tacotron2-lug is an open source model from GitHub that offers a free installation service, and any user can find tts-tacotron2-lug on GitHub to install. At the same time, huggingface.co provides the effect of tts-tacotron2-lug install, users can directly use tts-tacotron2-lug installed effect in huggingface.co for debugging and trial. It also supports api for free installation.