ASLP-lab commited on
Commit
80933de
·
verified ·
1 Parent(s): f69829f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md CHANGED
@@ -1,3 +1,73 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ pipeline_tag: text-to-speech
4
+ language:
5
+ - zh
6
+ - en
7
+ - de
8
+ - fr
9
+ - ja
10
+ - ko
11
+ tags:
12
+ - m5-tts
13
+ - voice-cloning
14
+ - multilingual
15
+ - onnx
16
+ - onnxruntime
17
  ---
18
+
19
+ # M5-TTS-50M-ONNX
20
+
21
+ English | [简体中文](README_zh.md)
22
+
23
+ [GitHub](https://github.com/ASLP-lab/M5-TTS) · [Demo](https://aslp-lab.github.io/M5-TTS-Demo-Page/) · [Space](https://huggingface.co/spaces/ASLP-lab/M5-TTS-Space) · [Models](https://huggingface.co/collections/ASLP-lab/m5-tts)
24
+
25
+ **M5-TTS** is a compact multilingual and multi-dialect text-to-speech system from ASLP@NPU and LycheeAI Lab. It combines a 30M temporal backbone with a 20M local multi-token prediction decoder, using 16 audio codebooks at 12.5 frames/s for **24 kHz** speech generation. The speech codec is separate from the language model.
26
+
27
+ This repository provides a **complete FP32 ONNX inference bundle**, including TTS graphs, text/audio embeddings, the text tokenizer and reference-audio encoder/decoder graphs. The same files support CPU and NVIDIA GPU voice cloning; no separate codec download is needed. The source checkpoint is identified in `manifest.json` and should not be assumed identical to another M5 checkpoint.
28
+
29
+ ## Quickstart
30
+
31
+ Use Python 3.10 on Linux. Install from the code repository:
32
+
33
+ ```bash
34
+ git clone https://github.com/ASLP-lab/M5-TTS.git
35
+ cd M5-TTS
36
+ conda create -n m5tts python=3.10 -y
37
+ conda activate m5tts
38
+ pip install -r requirements.txt
39
+ ```
40
+
41
+ **CPU inference**, from the repository root:
42
+
43
+ ```bash
44
+ python infer_onnx.py \
45
+ --model ASLP-lab/M5-TTS-50M-ONNX \
46
+ --device cpu --threads 4 \
47
+ --text "你好,欢迎使用我们的语音合成模型。" \
48
+ --prompt-wav assets/aslp_default_voice.wav \
49
+ --prompt-text "猪携带该疾病,然后通过蚊子传染给人类。" \
50
+ --output outputs/onnx_cpu.wav
51
+ ```
52
+
53
+ **NVIDIA GPU inference:**
54
+
55
+ ```bash
56
+ python infer_onnx.py \
57
+ --model ASLP-lab/M5-TTS-50M-ONNX \
58
+ --device cuda --device-id 0 \
59
+ --text "你好,欢迎使用我们的语音合成模型。" \
60
+ --prompt-wav assets/aslp_default_voice.wav \
61
+ --prompt-text "猪携带该疾病,然后通过蚊子传染给人类。" \
62
+ --output outputs/onnx_gpu.wav
63
+ ```
64
+
65
+ CUDA execution requires a compatible NVIDIA driver. The shared requirements install `onnxruntime-gpu`, which also supports CPU execution; do not additionally install `onnxruntime`. FlashAttention is not used by this entry point.
66
+
67
+ Add `--stream` to write generated audio chunks incrementally. Output is a WAV plus a same-stem JSON statistics file. The current ONNX entry point requires reference audio and its transcript; it does not expose preset speaker IDs or dialect/accent conditioning. CPU and GPU results may differ numerically.
68
+
69
+ See the [ONNX guide](https://github.com/ASLP-lab/M5-TTS#onnx-inference) and [Android example](https://github.com/ASLP-lab/M5-TTS/tree/main/android). Only clone voices you own or have permission to use.
70
+
71
+ ## License
72
+
73
+ Apache-2.0. The Qwen-derived audio codec retains its upstream attribution; see the [third-party notice](https://github.com/ASLP-lab/M5-TTS/blob/main/m5/codec_qwen12hz/NOTICE).