Instructions to use litert-community/Matcha-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/Matcha-TTS with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
README: add browser demo link (LiteRT.js, WebGPU+WASM)
Browse files
README.md
CHANGED
|
@@ -21,6 +21,10 @@ On-device English text-to-speech for Android via LiteRT `CompiledModel`. This is
|
|
| 21 |
conditional flow-matching (CFM) acoustic model with a **HiFi-GAN time-domain vocoder**, so
|
| 22 |
there is **no FFT/iSTFT anywhere** in the synthesis path. 22.05 kHz, LJSpeech voice.
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |

|
| 25 |
|
| 26 |
Converted from the official `matcha_ljspeech` + `hifigan_T2_v1` checkpoints with
|
|
@@ -139,6 +143,10 @@ See the LiteRT `compiled_model_api/text_to_speech` sample (Matcha-TTS) in
|
|
| 139 |
[google-ai-edge/litert-samples](https://github.com/google-ai-edge/litert-samples) for the full
|
| 140 |
Android app and the conversion scripts.
|
| 141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
## Performance
|
| 143 |
|
| 144 |
Measured on an Apple M4 Max, CPU/XNNPACK at 8 threads, `ai-edge-litert` 2.1.6 — median of 15 warm runs per graph, with zero-filled inputs of each graph's declared static shape. Run-to-run spread stayed within 5%.
|
|
|
|
| 21 |
conditional flow-matching (CFM) acoustic model with a **HiFi-GAN time-domain vocoder**, so
|
| 22 |
there is **no FFT/iSTFT anywhere** in the synthesis path. 22.05 kHz, LJSpeech voice.
|
| 23 |
|
| 24 |
+
**Try it in your browser:** [john-rocky.github.io/litertjs-demos/matcha-tts](https://john-rocky.github.io/litertjs-demos/matcha-tts/) —
|
| 25 |
+
the same four `.tflite` files below running on [LiteRT.js](https://www.npmjs.com/package/@litertjs/core)
|
| 26 |
+
(text encoder + vocoder on WebGPU, decoder on WASM). Nothing to install; inference runs on your machine.
|
| 27 |
+
|
| 28 |

|
| 29 |
|
| 30 |
Converted from the official `matcha_ljspeech` + `hifigan_T2_v1` checkpoints with
|
|
|
|
| 143 |
[google-ai-edge/litert-samples](https://github.com/google-ai-edge/litert-samples) for the full
|
| 144 |
Android app and the conversion scripts.
|
| 145 |
|
| 146 |
+
For the web, [john-rocky/litertjs-demos](https://github.com/john-rocky/litertjs-demos) has the
|
| 147 |
+
full browser pipeline on LiteRT.js (G2P, length regulation, the Euler ODE loop, and playback),
|
| 148 |
+
deployed at the Try-it link above.
|
| 149 |
+
|
| 150 |
## Performance
|
| 151 |
|
| 152 |
Measured on an Apple M4 Max, CPU/XNNPACK at 8 threads, `ai-edge-litert` 2.1.6 — median of 15 warm runs per graph, with zero-filled inputs of each graph's declared static shape. Run-to-run spread stayed within 5%.
|