| # Inflect-Nano-v2 TTS C++ SDK | |
| AX650 NPU3 U16-量化的文本转语音 C++ SDK。 | |
| ## Build | |
| ```bash | |
| mkdir build && cd build | |
| cmake .. -DAX_RUNTIME_ROOT=/opt/ax_engine | |
| make -j$(nproc) | |
| ``` | |
| ## CLI | |
| ```bash | |
| ./tts_cli --text "Hello world" --output output.wav | |
| ``` | |
| Options: `--speed 1.0`, `--variation 0.667`, `--encoder <path>`, `--decoder <path>` | |
| ## Server | |
| ```bash | |
| ./tts_server --port 8000 | |
| ``` | |
| OpenAI-compatible endpoints: `POST /v1/audio/speech`, `GET /health`, `GET /v1/models` | |
| Production server requires cpp-httplib + nlohmann/json (header-only): | |
| ```bash | |
| git clone https://github.com/yhirose/cpp-httplib.git | |
| git clone https://github.com/nlohmann/json.git | |
| cmake .. -DCPPHTTPLIB_DIR=../cpp-httplib -DJSON_DIR=../json | |
| ``` | |