Downloads · 30 days
39
0% of all-time downloads
projecte-aina/matxa-tts-cat-multispeaker
matxa-tts-cat-multispeaker is a text-to-speech model from projecte-aina. Use it when you need text read aloud. The card lists the license as gpl-3.0.
[!WARNING] There is a new version available! Visit Matxa-TTS v2 for a grapheme-based version
Downloads · 30 days
39
0% of all-time downloads
All-time downloads
9.2K
Public
Repo size
893 MB
Likes
6
Public
Click a slice to open those files.
.onnx346 MB · 51%
From the Hugging Face model README
[!WARNING] There is a new version available!
Visit Matxa-TTS v2 for a grapheme-based version
🍵 Matxa-TTS is based on Matcha-TTS that is an encoder-decoder architecture designed for fast acoustic modelling in TTS. The encoder part is based on a text encoder and a phoneme duration prediction that together predict averaged acoustic features. And the decoder has essentially a U-Net backbone inspired by Grad-TTS, which is based on the Transformer architecture. In the latter, by replacing 2D CNNs by 1D CNNs, a large reduction in memory consumption and fast synthesis is achieved.
Matxa-TTS is a non-autorregressive model trained with optimal-transport conditional flow matching (OT-CFM). This yields an ODE-based decoder capable of generating high output quality in fewer synthesis steps than models trained using score matching.
This model is intended to serve as an acoustic feature generator for multispeaker text-to-speech systems for the Catalan language. It has been finetuned using a Catalan phonemizer, therefore if the model is used for other languages it may will not produce intelligible samples after mapping its output into a speech waveform.
The quality of the samples can vary depending on the speaker. This may be due to the sensitivity of the model in learning specific frequencies and also due to the quality of samples for each speaker.
This model has been trained using the espeak-ng open source text-to-speech software. The espeak-ng containing the Catalan phonemizer can be found here
Create a virtual environment:
python -m venv /path/to/venv
source /path/to/venv/bin/activate
For training and inferencing with Catalan Matxa-TTS you need to compile the provided espeak-ng with the Catalan phonemizer:
git clone https://github.com/projecte-aina/espeak-ng.git
export PYTHON=/path/to/env/<env_name>/bin/python
cd /path/to/espeak-ng
./autogen.sh
./configure --prefix=/path/to/espeak-ng
make
make install
pip cache purge
pip install mecab-python3
pip install unidic-lite
Clone the repository:
git clone -b dev-cat https://github.com/langtech-bsc/Matcha-TTS.git
cd Matcha-TTS
Install the package from source:
pip install -e .
Speech end-to-end inference can be done together with Catalan Matxa-TTS. Both models (Catalan Matxa-TTS and alVoCat) are loaded remotely from the HF hub.
First, export the following environment variables to include the installed espeak-ng version:
export PYTHON=/path/to/your/venv/bin/python
export ESPEAK_DATA_PATH=/path/to/espeak-ng/espeak-ng-data
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/espeak-ng/lib
export PATH="/path/to/espeak-ng/bin:$PATH"
Then you can run the inference script:
cd Matcha-TTS
python3 matcha_vocos_inference.py --output_path=/output/path --text_input="Bon dia Manel, avui anem a la muntanya."
You can also modify the length scale (speech rate) and the temperature of the generated sample:
python3 matcha_vocos_inference.py --output_path=/output/path --text_input="Bon dia Manel, avui anem a la muntanya." --length_scale=0.8 --temperature=0.7
We also release a ONNX version of the model
The entire checkpoint is also released to continue training or finetuning. See the repo instructions
The model was trained on 2 Catalan speech datasets
Catalan Matcha-TTS was finetuned from the English multispeaker checkpoint, which was trained with the VCTK dataset and provided by the model authors.
The embedding layer was initialized with the number of catalan speakers (47) and the original hyperparameters were kept.
Validation values obtained from tensorboard from epoch 2399*:
(Note that the finetuning started from epoch 1864, as previous ones were trained with VCTK dataset)
If this code contributes to your research, please cite the work:
@misc{mehta2024matchatts,
title={Matcha-TTS: A fast TTS architecture with conditional flow matching},
author={Shivam Mehta and Ruibo Tu and Jonas Beskow and Éva Székely and Gustav Eje Henter},
year={2024},
eprint={2309.03199},
archivePrefix={arXiv},
primaryClass={eess.AS}
}
The Language Technologies Unit from Barcelona Supercomputing Center.
For further information, please send an email to [email protected].
Copyright(c) 2023 by Language Technologies Unit, Barcelona Supercomputing Center.
This work has been promoted and financed by the Generalitat de Catalunya through the Aina project.