A fine-tuned Twi text-to-speech model based on
VieNeu-TTS-0.3B, trained on the
Asante Twi Bible Speech dataset using LoRA.
1pip install git+https://github.com/michsethowusu/VieNeu-TTS.git
2pip install phonemizer
3# system dep for phonemizer
4sudo apt-get install espeak-ng
1from vieneu import Vieneu
2import json, soundfile as sf
3from huggingface_hub import hf_hub_download
4
5# Load voice presets
6voices_path = hf_hub_download("michsethowusu/VieNeu-TTS-Twi", "voices.json")
7with open(voices_path) as f:
8 voices = json.load(f)
9
10tts = Vieneu(
11 mode="standard",
12 backbone_repo="michsethowusu/VieNeu-TTS-Twi",
13 backbone_device="cuda",
14 codec_repo="neuphonic/neucodec-onnx-decoder-int8",
15 lang="twi",
16 emotion=None,
17)
18
19audio = tts.infer(
20 "Nanso Petro san hyɛɛ Kristofo nkuran sɛ monni nnipa nyinaa ni.",
21 voice=voices["presets"]["twi_voice_0"],
22)
23sf.write("output.wav", audio, 24000)
1pip install llama-cpp-python
2
3tts = Vieneu(
4 mode="standard",
5 backbone_repo="michsethowusu/VieNeu-TTS-Twi",
6 backbone_device="cpu",
7 gguf_filename="VieNeu-TTS-Twi-Q4_K_M.gguf",
8 codec_repo="neuphonic/neucodec-onnx-decoder-int8",
9 lang="twi",
10 emotion=None,
11)
1pip install vieneu[gpu]
2vieneu-serve \
3 --model michsethowusu/VieNeu-TTS-Twi \
4 --model-name michsethowusu/VieNeu-TTS-Twi \
5 --port 23333
6
7# Then connect from your app:
8tts = Vieneu(
9 mode="remote",
10 api_base="http://your-server:23333/v1",
11 model_name="michsethowusu/VieNeu-TTS-Twi",
12 lang="twi",
13 emotion=None,
14)
CC BY-NC 4.0 — non-commercial use only.
Mention
michsethowusu / GhanaNLP when using.