Skip to content

Latest commit

 

History

History
90 lines (69 loc) · 3.79 KB

File metadata and controls

90 lines (69 loc) · 3.79 KB

MeloTTS is a high-quality multi-lingual text-to-speech library for English, Chinese and Spanish language.

This is based on the implementation of MeloTTS-ZH found here. This repository contains scripts for optimized on-device export suitable to run on Qualcomm® devices. More details on model performance across various devices, can be found here.

Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.

Quick Start

Use our lightweight command-line interface to inspect and download MeloTTS-ZH:

pip install qai_hub_models_cli # (the CLI is also available with the qai-hub-models package)

# Inspect the model and list the available download options
qai-hub-models info MeloTTS-ZH

# Print performance and accuracy metrics
qai-hub-models perf MeloTTS-ZH
qai-hub-models numerics MeloTTS-ZH

# Download a ready-to-deploy asset
qai-hub-models fetch MeloTTS-ZH --runtime voice_ai --precision mixed_with_float

See the CLI README for the full list of commands and filters.

Deploying MeloTTS-ZH on-device

This model is compatible with the Qualcomm Voice AI SDK. Download the SDK from the Qualcomm Package Manager to deploy this model on-device.

Setup

1. Install System-Level Dependencies

Linux

sudo apt install libportaudio2

2. Install the package

Install the package via pip:

# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
pip install --no-deps git+https://github.com/myshell-ai/MeloTTS.git
pip install "qai-hub-models[melotts-zh]"

3. Configure Qualcomm® AI Hub Workbench

Sign-in to Qualcomm® AI Hub Workbench with your Qualcomm® ID. Once signed in navigate to Account -> Settings -> API Token.

With this API token, you can configure your client to run models on the cloud hosted devices.

qai-hub configure --api_token API_TOKEN

Navigate to docs for more information.

Run CLI Demo

Run the following simple CLI demo to verify the model is working end to end:

python -m qai_hub_models.models.melotts_zh.demo

More details on the CLI tool can be found with the --help option. See demo.py for sample usage of the model including pre/post processing scripts. Please refer to our general instructions on using models for more usage instructions.

Export for on-device deployment

To run the model on Qualcomm® devices, you must export the model for use with an edge runtime such as TensorFlow Lite, ONNX Runtime, or Qualcomm AI Engine Direct. Use the following command to export the model:

qai-hub-models export melotts_zh --target-runtime voice_ai --precision mixed_with_float --device "Samsung Galaxy S25 (Family)"

Additional options are documented with the --help option.

License

  • The license for the original implementation of MeloTTS-ZH can be found here.

References

Community