Tools

Text-to-Speech

Reply with synthesized audio instead of (or in addition to) text.

Introduction

The Text-to-Speech tool generates audio from a string and attaches it to the agent's reply. The agent uses it when the user asks for a voice response or when audio is the better delivery format.

It uses Laravel\Ai\Audio, so the underlying provider is whatever you've configured for AI_DEFAULT.

Enabling TTS

TTS is enabled by default. To turn it off:

LARACLAW_TTS_ENABLED=false

When disabled, the tool is not registered with the agent at all.

Voices

LARACLAW_TTS_VOICE=default-female

The two built-in values are default-female and default-male. A provider-specific voice ID is passed straight through.

The agent can override the default per call by passing a voice parameter to the tool.

Custom Instructions

The instructions parameter accepts a free-form string describing how the audio should sound (e.g. "speak slowly and calmly"). Whether they take effect depends on the provider — OpenAI's TTS accepts them, older models may not.

How the Audio Reaches the User

The tool writes a voice.mp3 file to outbound/{message_uuid}/ on the attachments disk. The connector picks it up before sending the reply and delivers it as the appropriate type for the channel — a voice message on Telegram, a file on Slack, an attachment on email.

Copyright © 2026