Vocu Developers
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
Api Docs(Current)
User GuideBack To APP
Api Docs(Current)
User GuideBack To APP
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
🇺🇸 English
  • 🇺🇸 English
  • 🇨🇳 简体中文
  1. Real-time Synthesis
  • Overview
  • Authentication Method
  • Voice Character
    • Create a new voice character
      POST
    • Get the list of voice characters for the current user
      GET
    • Add a style to the voice character with the specified ID
      POST
    • Upload avatar for the voice character with the specified ID
      POST
    • Add a voice character to the account via a share ID
      POST
    • Get details of the voice character with the specified ID
      GET
    • Delete Voice Character with the specified ID
      DELETE
    • Get the one-time share link ID for the specified voice character ID
      GET
    • Delete Style of the specified ID for the Voice Character with the specified ID
      DELETE
    • Generate a voice-character preview clip
      POST
    • Update a voice character's name and description
      POST
    • Inspect and backfill missing voice-character fields
      POST
    • Get the transcription of a style's reference audio
      GET
    • Correct the transcription of a style's reference audio
      POST
    • Set a style as the default style
      POST
    • Update a style's name and description
      POST
    • Reset a style and reprocess its reference audio
      POST
    • Re-upload professional-cloning artifacts
      POST
    • Trigger automatic re-upload of professional-cloning artifacts
      POST
    • Migrate a voice character to v2.0
      POST
    • Migrate a voice character to v3.0
      POST
    • Start voice-character identity verification
      POST
    • Check voice-character identity-verification result
      POST
  • Voice Generation
    • Synchronous real-time voice generation
    • Create Asynchronous Voice Generation Task
    • Get the list of asynchronous generation tasks for the current user
    • Get the details of an asynchronous generation task by ID
    • Delete an asynchronous generation task by ID
    • Upload audio for voice conversion
    • Stream the full generated audio
    • Stream audio for a single content
    • Get the streaming playback URL for a whole generation task
    • List splitter configurations
    • Create a splitter configuration
    • Get splitter configuration details
    • Update a splitter configuration (diff mode)
    • Delete a splitter configuration
    • One-shot synthesis returning an MP3 stream directly
    • List synthesis parameter presets
    • Fetch a synthesized audio stream
    • Get SRT subtitles for synthesized audio
  • User Account
    • Get current user account information
  • Content Template
    • Create New Template
    • Get User's Template List
    • Update Template with Specified ID
    • Get Template Details with Specified ID
    • Delete Template with Specified ID
  • Real-time Synthesis
    • Create a Turbo real-time synthesis channel
      POST
    • List Turbo channels for the current user
      GET
    • Close a Turbo channel
      DELETE
  • Voice Design
    • Generate a voice preview from a text description
    • Generate a voice preview by remixing / translating existing audio
    • Confirm a voice design and create a voice character
    • Query voice-design quota
  1. Real-time Synthesis

List Turbo channels for the current user

GET
https://v1.vocu.studio/api/tts/turbo/channel
List Turbo channels that are still alive for the current user, so a disconnected client can recover wsUrl and reconnect.
Important limitation: the channel list comes from the API process's in-memory map; Redis only stores individual channel details.
Therefore this endpoint can only see channels created by the current process and not yet lost to a process restart —
after a multi-instance deployment or a process restart, earlier channels will not appear here (but as long as you still have the turboChannelId,
WS connect and DELETE still work, because they read Redis).
Returns an empty array when the user has no channels; it does not error.

WebSocket protocol#

Connection#

WS path: /socket/tts/turbo/channel/{turboChannelId} (app.js:485 allowlist)
Use the wsUrl from the response directly; it already includes ?auth={32-character static token}
Auth is independent of HTTP Bearer JWT: during upgrade, the auth query is looked up in Redis auth:user:{token} to obtain userId;
failure returns a bare HTTP/1.1 401 Unauthorized (not a JSON error body)
After a successful upgrade the channel ownership is checked again; missing channel record or not owned by the current user → TURBO_CHANNEL_NOT_FOUND;
upstream socket not yet ready → TURBO_RESOURCE_EXHAUSTED (both are sent as an error frame, then the socket is closed immediately)
Optional query binary=1 (or format=binary) enables binary audio mode: audio is delivered as raw PCM16LE binary frames,
no longer wrapped in hex-JSON; empty frames are still utterance boundaries. Default is hex_json mode.

client → server#

typeDescription
synthesis_requestSubmit one utterance of text to synthesize. Note the type is named synthesis_request, not speak
cancelInterrupt the current utterance (barge-in). Instruct channels only; a regular channel returns VALIDATION_BAD_PARAMS
pingHeartbeat; the server replies with pong
close_channelActively close the channel and release the concurrency slot. The type is named close_channel, not close
The data field of synthesis_request differs by channel type:
Regular (zide) channel: { text, promptId?, language?, preset?, seed?, speechRate?, emo_switch?, vivid?, gamble?, post_processing?, infinite_mode?, break_clone?, break_time?, break_float_time?, volume?, temperature?, top_k?, top_p?, presence_penalty?, frequency_penalty?, repetition_penalty?, min_p? }
— aligned with /api/tts/simple-generate parameters
Instruct channel: { text, language? } only. text may contain {{...}} emotion-control markers;
timbre / emotion parameters do not apply; billing is computed on the text after markers are stripped

server → client#

typeDescription
connectedClient connected successfully. data contains the audio encoding description; instruct channels additionally include features
audio_chunkOne audio frame. data.hex is hex-encoded PCM16LE @24kHz mono; an empty frame = utterance boundary
audio_generatedOne utterance finished. data.audioUrl is the WAV URL; when save_audio:false it is null and saved:false is present
audio_generate_failedThis utterance failed (not billed); the channel stays alive and the client may resend
cancelledInterrupt took effect (instruct channels only)
pongHeartbeat response
errorRequest-level error; the channel is not closed
closeServer is closing the channel (upstream disconnect, graceful process exit, etc.); the socket closes afterwards

WS error body differs from HTTP#

WS-side errors are produced by buildSocketErrorBody() (modules/errorCodes.js:379), shaped as:
{ "type": "error", "data": { "status": 400, "code": "VALIDATION_TOO_LONG", "message": "..." } }
Never includes requestId — requestId is injected only by the HTTP response interceptor in app.js; WS does not go through that path.
audio_generate_failed / audio_generated (when upload fails) / close frames use the same data shape.
Common WS error codes: VALIDATION_MISSING_FIELD (missing text), VALIDATION_TOO_LONG (utterance too long),
RATE_LIMIT_CONCURRENT (pending-utterance cap exceeded), RESOURCE_NOT_FOUND (promptId does not exist),
VALIDATION_INVALID_VALUE (illegal emo_switch format), VALIDATION_BAD_PARAMS (payload is not JSON, or cancel sent on a regular channel),
SAFETY_CHECK_FAILED / CONTENT_MODERATION_BLOCKED (text moderation), BILLING_INSUFFICIENT_CREDIT (insufficient balance),
TTS_GENERATE_FAILED (synthesis failed), UPLOAD_FAILED (audio was delivered but WAV upload failed),
SYSTEM_INTERNAL_ERROR / SYSTEM_SHUTTING_DOWN (sent with a close frame).

Limits#

The following two caps apply only to instruct channels (mirroring VoiceDesign upstream INSTRUCT_TTS_MAX_TEXT_CHARS /
INSTRUCT_WS_MAX_PENDING_SPEAKS, routes/generate/turbo.js:64-65):
Per-utterance text 8192 characters (TURBO_INSTRUCT_MAX_TEXT_CHARS) — exceeding returns VALIDATION_TOO_LONG
Pending-utterance cap 16 (TURBO_INSTRUCT_MAX_PENDING_SPEAKS) — exceeding returns RATE_LIMIT_CONCURRENT
Regular (zide) channels do not apply these two checks; the upstream decides on its own.
Concurrent channel count is determined by the user option turboConcurrent: a value < 1 (including unset) means no Turbo permission,
and creation returns TURBO_CONCURRENCY_LIMIT immediately; the same code is returned when all slots are occupied.

Lifecycle#

A client must connect to the WS within 60 seconds after creation succeeds (cancelAfter in the response), otherwise the channel is reclaimed
After the last client disconnects there is likewise a 60-second grace period, after which the upstream and the concurrency slot are released
The Redis channel record has a 24-hour TTL, used only as crash-recovery cleanup, and does not represent how long the channel stays usable
A client whose backlog exceeds 16MB unconsumed is disconnected with close code 1013 (slow-consumer protection)

Error responses take the shape { status, code, message, requestId? }. code is always the parent code — sub codes only change message and never appear in the body. requestId is present only on reportable-tier errors, so use the X-Vocu-App-Request-Id response header when troubleshooting (it is written unconditionally on every response). See the "Errors" document for the full code reference.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://v1.vocu.studio/api/tts/turbo/channel' \
--header 'Authorization: Bearer <token>'

Responses

🟢200成功
application/json
查询成功
Bodyapplication/json

Example
{
    "status": 200,
    "data": [
        {
            "id": "b1f4c8e2-5d3a-4b7e-9c16-2a8f0d5e7c43",
            "wsUrl": "wss://api.vocu.ai/socket/tts/turbo/channel/b1f4c8e2-5d3a-4b7e-9c16-2a8f0d5e7c43?auth=Kx7mQ2pR9vTn4LbW8sYc3JdF6HgZ1aEu",
            "voiceId": "7d24ca9a-0045-4056-acac-be863b32369e"
        }
    ]
}
🟠401没有权限
🟠429
Modified at 2026-08-23 01:11:55
Previous
Create a Turbo real-time synthesis channel
Next
Close a Turbo channel