add xfyun tts service
This commit is contained in:
26
README.md
26
README.md
@@ -131,6 +131,32 @@ the TTS in the pipeline. `response.text.final` fires when the turn ends,
|
||||
carrying the full concatenated assistant text and an `interrupted` flag
|
||||
(true when an `input.text` or barge-in cut the turn short).
|
||||
|
||||
### Xfyun TTS
|
||||
|
||||
The TTS provider can be switched to iFlytek/Xfyun's online TTS WebSocket API.
|
||||
The engine requests `aue: "raw"` PCM audio so the returned chunks can be sent
|
||||
through the existing Pipecat/product audio path without MP3 decoding.
|
||||
|
||||
```json
|
||||
"tts": {
|
||||
"provider": "xfyun",
|
||||
"app_id": "your_xfyun_app_id",
|
||||
"api_key": "your_xfyun_api_key",
|
||||
"api_secret": "your_xfyun_api_secret",
|
||||
"base_url": "wss://tts-api.xfyun.cn/v2/tts",
|
||||
"voice": "x4_xiaoyan",
|
||||
"aue": "raw",
|
||||
"tte": "UTF8",
|
||||
"speed": 50,
|
||||
"volume": 50,
|
||||
"pitch": 50,
|
||||
"source_sample_rate_hz": 16000
|
||||
}
|
||||
```
|
||||
|
||||
Credentials may also be provided through `XFYUN_APP_ID`, `XFYUN_API_KEY`, and
|
||||
`XFYUN_API_SECRET`.
|
||||
|
||||
## Stream A WAV File
|
||||
|
||||
Start the server:
|
||||
|
||||
Reference in New Issue
Block a user