Downloads · 30 days
1
2% of all-time downloads
varrelkusuma/AphaVoice
AphaVoice is a text-to-speech model from varrelkusuma. Use it when you need text read aloud. The card lists the license as apache-2.0.
AphaVoice is a specialized Text-to-Speech (TTS) model designed to simulate non-fluent aphasic speech for medical student training and clinical simulation. AphaVoice fine-tunes the non-autoregressive architecture of Ma…
Downloads · 30 days
1
2% of all-time downloads
All-time downloads
58
Public
Repo size
501 MB
Likes
0
Public
Click a slice to open those files.
.ckpt251 MB · 81%
From the Hugging Face model README
AphaVoice is a specialized Text-to-Speech (TTS) model designed to simulate non-fluent aphasic speech for medical student training and clinical simulation. AphaVoice fine-tunes the non-autoregressive architecture of Matcha-TTS to accurately map the distinct temporal and phonetic dysfluencies characteristic of post-stroke aphasia.
You can download and run the model locally using the huggingface_hub library.
Before you could use the model, as this is built on top of Matcha-TTS, you need to install all their dependencies to make it work. Please refer to this github: https://github.com/varrelkusuma/AphaVoice
Prerequisites:
pip install huggingface_hub soundfile spacy pyyaml torch safetensors noisereduce
python -m spacy download en_core_web_sm
sudo apt-get install espeak-ng # Required for Linux/Colab phonemization
Inference Code:
import os
import sys
import soundfile as sf
import IPython.display as ipd
from huggingface_hub import snapshot_download
# 1. Download the AphaVoice repository
repo_path = snapshot_download(repo_id="varrelkusuma/AphaVoice")
sys.path.insert(0, repo_path)
from inference import AphaVoicePipeline
# 2. Initialize the model
pipeline = AphaVoicePipeline(
config_path=os.path.join(repo_path, "config.yaml"),
model_path=os.path.join(repo_path, "model.ckpt"),
vocoder_path=os.path.join(repo_path, "vocoder")
)
# 3. Generate Speech
text = "The patient needs a glass of water."
sample_rate, audio_data, final_script = pipeline.synthesise(
text=text,
speaker_id=0, # 0 for Female Model, 1 for Male Model
apply_aphasia=True, # Applies the clinical dysfluency script, change to "False" for normal speech generation
severity=0.4, # Probability of dysfluency, value from 0-1
length_scale=1.0 # Pacing adjustment
)
# 4. Save output
print(f"Synthesized script: {final_script}")
display(ipd.Audio(audio_data, rate=22050))
If you use AphaVoice in your research, please cite our paper:
@article{
title={AphaVoice: Text-to-Speech Model for Aphasia Patient Simulation},
author={Kusuma, Varrel, and Bello, Fernando and Brown, Joshua},
journal={[TBD - In Review]},
year={2026}
}
Note: Full citation details will be updated upon publication.