Downloads · 30 days
38
37% of all-time downloads
aybdee/Igbo-SpeechSynthesis
Igbo-SpeechSynthesis is a machine learning model from aybdee. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A text-to-speech model generating natural Nigerian-accented English speech. Built on pure language modeling without external adapters.
Downloads · 30 days
38
37% of all-time downloads
All-time downloads
104
Public
Parameters
366M
2.5 GB on disk
Likes
9
Trending 4
Click a slice to open those files.
Other1.8 GB · 70%
From the Hugging Face model README
A text-to-speech model generating natural Nigerian-accented English speech. Built on pure language modeling without external adapters.
Web Url: https://yarngpt.co/
!git clone https://github.com/saheedniyi02/yarngpt.git
pip install outetts uroman
import os
import re
import json
import torch
import inflect
import random
import uroman as ur
import numpy as np
import torchaudio
import IPython
from transformers import AutoModelForCausalLM, AutoTokenizer
from outetts.wav_tokenizer.decoder import WavTokenizer
!wget https://huggingface.co/novateur/WavTokenizer-medium-speech-75token/resolve/main/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml
!gdown 1-ASeEkrn4HY49yZWHTASgfGFNXdVnLTt
from yarngpt.audiotokenizer import AudioTokenizerV2
tokenizer_path="saheedniyi/YarnGPT2"
wav_tokenizer_config_path="/content/wavtokenizer_mediumdata_frame75_3s_nq1_code4096_dim512_kmeans200_attn.yaml"
wav_tokenizer_model_path = "/content/wavtokenizer_large_speech_320_24k.ckpt"
audio_tokenizer=AudioTokenizerV2(
tokenizer_path,wav_tokenizer_model_path,wav_tokenizer_config_path
)
model = AutoModelForCausalLM.from_pretrained(tokenizer_path,torch_dtype="auto").to(audio_tokenizer.device)
#change the text
text="The election was won by businessman and politician, Moshood Abiola, but Babangida annulled the results, citing concerns over national security."
# change the language and voice
prompt=audio_tokenizer.create_prompt(text,lang="english",speaker_name="idera")
input_ids=audio_tokenizer.tokenize_prompt(prompt)
output = model.generate(
input_ids=input_ids,
temperature=0.1,
repetition_penalty=1.1,
max_length=4000,
#num_beams=5,# using a beam size helps for the local languages but not english
)
codes=audio_tokenizer.get_codes(output)
audio=audio_tokenizer.get_audio(codes)
IPython.display.Audio(audio,rate=24000)
torchaudio.save(f"Sample.wav", audio, sample_rate=24000)
Check out our demo notebook or listen to sample outputs.
@misc{yarngpt2025,
author = {Saheed Azeez},
title = {YarnGPT: Nigerian-Accented English Text-to-Speech Model},
year = {2025},
publisher = {Hugging Face}
}
MIT
Built with WavTokenizer and inspired by OuteTTS.