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

DevFeed: [Stream low-latency speech from AI agents using Kokoro TTS on Amazon SageMaker AI](<https://devfeed.tech/articles/stream-low-latency-speech-from-ai-agents-using-kokoro-tts-on-amazon-sagemaker-ai-96160.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/machine-learning/stream-low-latency-speech-from-ai-agents-using-kokoro-tts-on-amazon-sagemaker-ai/>)

Author: Joseph Cottingham

Published: 2026-10-22T17:45:58Z

Content type: tutorial

Language: en

Sources: [Artificial Intelligence](<https://devfeed.tech/sources/artificial-intelligence.md>)

Topics: [Real-time AI interactions](<https://devfeed.tech/topics/real-time-ai-interactions.md>), [Speech Processing](<https://devfeed.tech/topics/speech-processing.md>), [Amazon SageMaker](<https://devfeed.tech/topics/amazon-sagemaker.md>), [Amazon Bedrock AgentCore](<https://devfeed.tech/topics/amazon-bedrock-agentcore.md>), [Amazon Bedrock](<https://devfeed.tech/topics/amazon-bedrock.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [amazon](<https://devfeed.tech/tags/amazon.md>), [amazon-sagemaker](<https://devfeed.tech/tags/amazon-sagemaker.md>), [amazon-sagemaker-ai](<https://devfeed.tech/tags/amazon-sagemaker-ai.md>), [audio](<https://devfeed.tech/tags/audio.md>), [browser](<https://devfeed.tech/tags/browser.md>), [events](<https://devfeed.tech/tags/events.md>), [expert-400](<https://devfeed.tech/tags/expert-400.md>), [full](<https://devfeed.tech/tags/full.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [latency](<https://devfeed.tech/tags/latency.md>), [low-latency](<https://devfeed.tech/tags/low-latency.md>), [model](<https://devfeed.tech/tags/model.md>), [over](<https://devfeed.tech/tags/over.md>), [speech](<https://devfeed.tech/tags/speech.md>), [stream](<https://devfeed.tech/tags/stream.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [tts](<https://devfeed.tech/tags/tts.md>), [using](<https://devfeed.tech/tags/using.md>)

## AI overview

Streaming each completed agent sentence to a Kokoro-82M endpoint on SageMaker AI starts speech synthesis before the full response is ready. In five trials, incremental input reduced mean time to first audio byte from 329.3 ms to 156.7 ms; end-to-end bidi mode was 2.4 times faster than batch locally and 3.5 times faster in the deployed AgentCore runtime. The endpoint keeps one bidirectional session open across sentences and processes each sentence sequentially; audio for an early sentence can reach the caller while later text is still being generated. For audio delivery, base64 in SSE fits an existing text pipeline but adds about 33% payload and requires buffering to reassemble MP3 frames. A unified session can carry raw binary audio alongside JSON control frames without that encoding overhead. The AgentCore example still base64-encodes its caller-facing audio because its entrypoint yields JSON-serializable data. Deployment requires AWS resources and a container configured for bidirectional streaming; the article flags an older PyTorch pin with a known advisory for review and upgrade before non-proof-of-value use.

## Source excerpt

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.