Google Gemini 3.8 Flash Lite Text To Speech API Documentation
Playground
Try it on WaveSpeedAI!Gemini 3.8 Flash-Lite Text-to-Speech generates expressive speech from text with configurable voice and delivery-style controls for narration, dialogue, localization, virtual assistants, and scalable voice production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Gemini 3.8 Flash-Lite Text-to-Speech generates expressive WAV speech from text with 30 preset voices and natural-language control over tone, pacing, accent, and emotion.
It supports both single-speaker narration and two-speaker dialogue, making it suitable for voiceovers, conversations, storytelling, and other speech-generation workflows.
Why Choose This?
-
Expressive text-to-speech
Generate natural speech with control over tone, pace, accent, and emotion. -
30 preset voices
Choose from a wide range of built-in voices for different speaking styles. -
Natural-language delivery control
Usestyle_instructionsto describe how the speech should sound. -
Single-speaker narration
Create voiceovers, narration, explanations, and spoken content. -
WAV output
Receive generated speech as a downloadable WAV audio file.
Parameters
| Parameter | Required | Description |
|---|---|---|
| text | Conditional | Text to speak for single-speaker generation. Supports up to 8000 characters. Omit when using dialogue mode. |
| voice | No | Preset voice for single-speaker speech. Default: Kore. |
| style_instructions | No | Optional instructions for tone, pacing, accent, emotion, and delivery style. Supports up to 2000 characters. |
| speakers | Conditional | Configuration for two dialogue speakers and their voices. |
| turns | Conditional | Ordered dialogue turns containing the speaker, text, and optional delivery instructions. |
How to Use
- Enter the text — Provide the content you want spoken.
- Choose a voice — Select one of the available preset voices.
- Add style instructions optional — Describe the desired tone, pace, accent, or emotion.
- Submit — Generate and retrieve the WAV audio.
For dialogue, configure two speakers and provide their lines through turns.
Pricing
Pricing is $0.04 per 1,000 billable characters, with a minimum charge of $0.04 per request.
| Billable Characters | Price |
|---|---|
| 100 | $0.04 |
| 1,000 | $0.04 |
| 5,000 | $0.20 |
Text and delivery instructions contribute to billable character count.
Best Use Cases
- Voiceovers — Generate speech for videos, presentations, and promotional content.
- Narration — Create spoken content for stories, explainers, and educational material.
- Two-speaker conversations — Generate dialogue between two different preset voices.
- Character voices — Use voice and style controls for different speaking personalities.
- Localized content — Guide accent, tone, and delivery for different language workflows.
- Conversational prototypes — Create spoken interactions for demos, assistants, and characters.
Pro Tips
- Keep spoken content separate from delivery instructions.
- Use short, specific style instructions for more consistent results.
- Describe tone, pace, energy, or emotion directly.
- Use different voices for clearer separation in dialogue.
- Inline vocal events such as
<laugh>or<sigh>can be used when needed.
Notes
textsupports up to8000characters.style_instructionssupports up to2000characters.- The default voice is
Kore. - Dialogue mode supports two speakers.
Related Models
- Gemini 3.8 Flash-Lite Text-to-Speech — Generate expressive speech with preset voices and lightweight text-to-speech workflows.
- Gemini 3.8 Flash Text-to-Speech — Generate expressive single-speaker or two-speaker speech with natural-language delivery control.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"voice": "Kore"
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/google/gemini-3.8-flash-lite/text-to-speech" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| text | string | No | - | - | Text to speak. For dialogue, leave text empty and provide speakers and turns. Delivery directions belong in style_instructions. |
| voice | string | No | Kore | Achernar, Achird, Algenib, Algieba, Alnilam, Aoede, Autonoe, Callirrhoe, Charon, Despina, Enceladus, Erinome, Fenrir, Gacrux, Iapetus, Kore, Laomedeia, Leda, Orus, Puck, Pulcherrima, Rasalgethi, Sadachbia, Sadaltager, Schedar, Sulafat, Umbriel, Vindemiatrix, Zephyr, Zubenelgenubi | Prebuilt voice for single-speaker speech. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |