Vocu Developers
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
Api Docs(Current)User GuideBack To APP
Api Docs(Current)User GuideBack To APP
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
  1. Api Docs(Current)
  • Overview
  • Authentication method
  • Low latency WebSocket real-time generation
  • Voice character
    • Create new voice character
      POST
    • Add style to voice character with specified ID
      POST
    • Upload avatar for voice character with specified ID
      POST
    • Add voice character to account via share ID
      POST
    • Get current user's voice character list
      GET
    • Get voice character details for specified ID
      GET
    • Get one-time share link ID for specified voice character ID
      GET
    • Delete voice character with specified ID
      DELETE
    • Delete specified ID style of voice character with specified ID
      DELETE
  • Voice generation
    • Synchronous real-time voice generation
      POST
    • Create asynchronous voice generation task
      POST
    • Regenerate asynchronous generation task for specified ID
      POST
    • Simple streaming voice generation
      GET
    • Get current user's asynchronous generation task list
      GET
    • Get asynchronous generation task details for specified ID
      GET
    • Delete asynchronous generation task with specified ID
      DELETE
  • User account
    • Get current user account information
      GET
  • File management
    • Create chunked upload file for subsequent professional cloning use
      POST
    • Upload chunk file
      POST
    • Complete file chunked upload
      POST
    • Simple file upload
      POST
  • Content template
    • Create new template
      POST
    • Update template with specified ID
      POST
    • Get user's template list
      GET
    • Get template details for specified ID
      GET
    • Delete template with specified ID
      DELETE
  1. Api Docs(Current)

Low latency WebSocket real-time generation

This document will help you understand how to use Vocu's millisecond-level low-latency WebSocket real-time generation solution.
With this solution, regardless of the target text length, voice generation delay can be controlled to around 700ms.

Prerequisites#

Please check in Vocu Creation Center's Developer Center - Quotas and Limits - Quotas to see if you have the millisecond-level low-latency concurrency quota.
If you don't have this quota, please click Need More Quota and discuss with the sales team to get details on quota and pricing for millisecond-level low-latency real-time generation.

Opening the Turbo Channel#

Low-latency real-time generation needs to be done over a WebSocket channel.
First, you need to request the relevant API to open the Turbo generation channel.
Note that once Turbo is opened, the role cannot be changed.
You can only use the role selected when the channel was opened, and only v2.0+ roles are supported.
As stated in cancelAfter, you need to connect to the WebSocket address provided by wsUrl within 60 seconds, otherwise the channel will be automatically cancelled and you will need to reopen the Turbo channel.

Connecting to the Channel for Generation#

After connecting to the channel, if successful, you will receive a 200 message.
You can use your client to send a JSON message to start generation.
You can use the promptId of any style available in the selected role to generate with another style.
If your synthesis_request is valid, the backend will immediately start the generation task and send audio_chunk messages as soon as they are available.
Here, hex is the hex-encoded PCM audio data, and pcm contains its parameter information.
If you receive an empty hex, it means that the current audio segment has finished generating.
At the end of each generated audio segment, you will receive:
While audio is being generated, you can still send new synthesis_request messages. All generation requests will be queued and processed in order.

Keeping the Connection Alive#

After the WebSocket connection is successfully established, please send the following at regular intervals:
The server will respond immediately:
If the connection is idle for too long (~1 minute), it may be closed to free resources.
If you wish to keep the connection alive, send ping messages periodically.

Closing the Channel#

If there are no client connections for 60 seconds, the channel will close automatically.
You can also send the following message to close the channel immediately:
When the channel closes, you will receive:
Once the channel is closed, all connections will be terminated immediately and the occupied concurrency will be released.

Managing Turbo Channels via HTTP API#

This request lists all currently active Turbo channels in your account.
Example response:

This request closes the channel specified by :id.
Modified at 2025-08-09 14:44:52
Previous
Authentication method
Next
Create new voice character