AI Cloud Architect

Stream low-latency speech from AI agents using Kokoro TTS on Amazon SageMaker AI

AWSHow-to by Joseph CottinghamAWS Artificial Intelligence Blog

Voice agents often wait for an agent’s full response before starting speech synthesis, adding latency users feel directly. This post shows how to stream each sentence to a Kokoro-82M text-to-speech model on Amazon SageMaker AI as the agent produces it, and how to get that audio back to a browser over Server-Sent Events or a unified binary transport.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Streams each agent sentence to a Kokoro-82M TTS model on a SageMaker AI bidirectional endpoint so speech synthesis starts before the full response is ready.

Who it is for

Teams building voice agents on SageMaker AI and Bedrock AgentCore that need lower time to first audio.

Key points

  • AWS reports time to first audio 52.4% faster for a single sentence in isolation, and 2.4 to 3.5 times faster in a deployed agent (batch vs bidi mode)
  • Base64-encoded audio in SSE adds about 33% payload size; the post recommends a binary and JSON multiplexed transport for new voice paths
  • Post warns that a PyTorch pin in the sample container has a known advisory (PYSEC-2026-2286, fixed in torch 2.10.0)

The same at other vendors

Timeline

  1. What it explainsAmazon SageMaker AI Inference now supports bidirectional streaming · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  2. Read nextStop guessing auto scaling targets for TTS on Amazon SageMaker AI · AWS · How-to
  3. This postStream low-latency speech from AI agents using Kokoro TTS on Amazon SageMaker AI

Go deeper