OpenAI
This example uses an OpenAI real-time voice chat model:text and audio in modalities for text and audio output, or just text for text only. Use audio to set the voice and audio format. OpenAI models use the same parameters as text-to-speech.
Chinese platforms
OpenAI’s output voices may be less suitable for Chinese speech (this does not affect text-only output). Alternatives include Zhipu Qingyan and Qwen. Zhipu Qingyan does not requiremodalities or audio. Qwen uses the same modalities settings as OpenAI and supports the following Chinese voices (the voice field of audio):
- Cherry (not supported by open-source models)
- Serena (not supported by open-source models)
- Ethan
- Chelsie
format field of audio) is wav.
Example voice chat request with Qwen:
curl
