File size: 1,152 Bytes
7cbe545 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # Inflect-Micro-v2 C++ SDK for AX650
## Build
```bash
export AX_RUNTIME_ROOT=/path/to/ax650_bsp
mkdir build && cd build
cmake .. && make
```
Produces:
- `libinflect_tts.a` — TTS engine library
- `tts_cli` — Command-line TTS tool
- `tts_server` — OpenAI-compatible HTTP server
## CLI
```bash
./tts_cli --text "Hello world" --output speech.wav
./tts_cli --text "Faster speech" --speed 1.5 --output fast.wav
```
## HTTP Server (OpenAI-compatible)
```bash
./tts_server --port 8000
```
```bash
# Test
curl -X POST http://localhost:8000/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","input":"Hello world"}' \
--output speech.wav
```
For full HTTP support, install cpp-httplib and nlohmann/json,
uncomment `USE_CPPHTTPLIB` in CMakeLists.txt.
## API
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/health` | GET | Health check |
| `/v1/models` | GET | List models |
| `/v1/audio/speech` | POST | OpenAI TTS API |
Request body for `/v1/audio/speech`:
```json
{
"model": "tts-1",
"input": "Hello world",
"voice": "default",
"speed": 1.0,
"response_format": "wav"
}
```
|