API references/Speech
Stream speech
speech.volc.synthesize_streamGenerate base64-encoded MP3 audio from up to 2,000 characters, delivered as a stream.
Unit price$0.09 / 1,000 input characters
Try in the consoleRequest parameters
| Parameter | Type | Description |
|---|---|---|
speakerRequired | string | Voice ID Minimum length: 1Up to 200 characters |
textRequired | string | Text to read aloud Minimum length: 1Up to 2000 characters |
speech_rate | integer | Speech rate: -50 to 100 Range -50–100Default: 0 |
Response data
Business data is in execution.result.data. Executions also include status, final cost and an Anyuse request ID.
| Parameter | Type | Description |
|---|---|---|
audio_base64 | string | null | Complete audio encoded as base64, up to 2 MiB |
mime_type | string | null | live uses audio/mpeg; mock uses audio/wav |
usage | object | null | Provider-reported usage for reconciliation only; it does not change this quote |
Execution states and recovery
Connect to the event stream after submission. Audio arrives in
audio events; audio_base64 contains each chunk; done marks completion.Read the event stream
Execution states and recoverycurl -N "https://api.anyuse.app/v1/executions/EXECUTION_ID/events" \
-H "Authorization: Bearer $ANYUSE_API_KEY"