> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zocomputer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate speech

> Generate speech with a preset voice and save it in the workspace.

{/* Tool: generate_speech */}

Speech generation uses a conformed Vercel AI Gateway model and is paid-only at launch.

## Parameters

<ParamField path="text" type="string" required={true}>
  Text to speak, after outer whitespace is removed. Maximum 4,000 characters.
</ParamField>

<ParamField path="file_stem" type="string" required={true}>
  Output base name.
</ParamField>

<ParamField path="output_dir" type="string" default={""}>
  Output directory. Defaults to /home/workspace/Audio.
</ParamField>

<ParamField path="voice" type="string" default={"eve"}>
  Preset voice: ara, eve, leo, rex, or sal.
</ParamField>

<ParamField path="format" type="string" default={"mp3"}>
  Output format: mp3 or wav.
</ParamField>

<ParamField path="language" type="string" default={"en"}>
  BCP-47 language code accepted by the selected model, such as en, es-MX, or auto.
</ParamField>

<ParamField path="speed" type="number" default={1.0}>
  Speech speed from 0.7 to 1.5.
</ParamField>

<ParamField path="instructions" type="string" default={"Natural, clear delivery."}>
  Reserved delivery guidance. Current Grok TTS accepts only the default because its Gateway profile does not expose instructions.
</ParamField>

<ParamField path="model" type="string" default={""}>
  Optional public speech model ID.
</ParamField>

<ParamField path="voice_sample_path" type="string" default={""}>
  Reserved workspace voice sample path. Current profiles reject it.
</ParamField>
