Views
No views yet
rw), English (en)Unsloth framework for optimized hardware utilization. Training was intentionally halted early (around Epoch 10) to prevent the LLM backbone from memorizing the dataset and losing natural prosody.bfloat16 precision (where supported).MiraTTS library and align your PyTorch audio dependencies:1pip install git+https://github.com/ysharma3501/MiraTTS.git
2# Ensure torchaudio and torchvision match your active PyTorch version1import torch
2from mira.model import MiraTTS
3from IPython.display import Audio, display
4
5print("Loading Kinyarwanda Phase 1 Model...")
6# Initialize the model directly from the Hub
7mira_tts = MiraTTS("Professor/MiraTTS-Kinyarwanda-Phase1")
8
9# Provide a path to a real, high-quality audio file to use as the voice print
10reference_audio_path = "/path/to/your/reference_audio.wav"
11
12test_text = "Muraho neza! Uyu munsi turimo kugerageza porogaramu nshya y'ikinyarwanda."
13
14# Extract voice context and synthesize
15print("Synthesizing audio...")
16context_tokens = mira_tts.encode_audio(reference_audio_path)
17audio = mira_tts.generate(test_text, context_tokens)
18
19# Play the audio (if running in a Jupyter/Colab notebook)
20display(Audio(audio, rate=48000))