Google Gemini 3.8 Flash Lite Text To Speech API Documentation

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
    Use style_instructions to 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

ParameterRequiredDescription
textConditionalText to speak for single-speaker generation. Supports up to 8000 characters. Omit when using dialogue mode.
voiceNoPreset voice for single-speaker speech. Default: Kore.
style_instructionsNoOptional instructions for tone, pacing, accent, emotion, and delivery style. Supports up to 2000 characters.
speakersConditionalConfiguration for two dialogue speakers and their voices.
turnsConditionalOrdered dialogue turns containing the speaker, text, and optional delivery instructions.

How to Use

  1. Enter the text — Provide the content you want spoken.
  2. Choose a voice — Select one of the available preset voices.
  3. Add style instructions optional — Describe the desired tone, pace, accent, or emotion.
  4. 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 CharactersPrice
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

  • text supports up to 8000 characters.
  • style_instructions supports up to 2000 characters.
  • The default voice is Kore.
  • Dialogue mode supports two speakers.

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
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
textstringNo--Text to speak. For dialogue, leave text empty and provide speakers and turns. Delivery directions belong in style_instructions.
voicestringNoKoreAchernar, 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, ZubenelgenubiPrebuilt voice for single-speaker speech.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<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.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.