Realtime TTS-2 is live. Built for realtime conversation that feels human. Learn more

TextToSpeech

Synthesize speech (stream)

Receive audio chunks as they are individually processed.

POST/tts/v1/voice:stream

Authorizations

Authorizationstringrequired

Your authentication credentials. For Basic authentication, please populate Basic $INWORLD_API_KEY. You can create a key in one command with the Inworld CLI: inworld workspace add-key.

Body

application/json

textstringrequired

The text to be synthesized into speech. Maximum input of 4,000 characters.

timestampTransportStrategyenum<string>default: "TIMESTAMP_TRANSPORT_STRATEGY_UNSPECIFIED"

The transport strategy of timestamps info.

  • TIMESTAMP_TRANSPORT_STRATEGY_UNSPECIFIED: The service will automatically decide the transport strategy.
  • SYNC: Timestamps will be returned in the same message as the audio data.
  • ASYNC: Timestamps could return in trailing message after the audio data. Use this strategy to reduce latency of the first audio chunk.

Available options:TIMESTAMP_TRANSPORT_STRATEGY_UNSPECIFIEDSYNCASYNC