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

# AI Voiceover Generator

> Generate voice overs using TTS APIs

# AI Voiceover Generator

Generate professional voice overs from text using OpenAI TTS with multiple voice options.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
flowchart LR
    A[Script Text] --> B[AI Voiceover Generator]
    B --> C[TTS Processing]
    C --> D[Audio File]
    
    style A fill:#e1f5fe
    style D fill:#c8e6c9
```

## CLI Quickstart

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai recipe run ai-voiceover-generator \
  --input '{"text": "Welcome to our AI news show...", "voice": "alloy"}' \
  --json
```

## Use in Your App (SDK)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import sys
sys.path.insert(0, 'agent_recipes/templates/ai-voiceover-generator')
from tools import generate_voiceover, generate_speech

# Generate voiceover
result = generate_voiceover(
    text="Welcome to our AI news show...",
    output_path="voiceover.mp3",
    voice="alloy",
    speed=1.0
)

# Generate speech from longer script (auto-chunks)
speech = generate_speech(
    script="Long script text here...",
    output_dir="./voiceovers",
    voice="nova"
)
```

## Input Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "type": "object",
  "properties": {
    "text": {"type": "string"},
    "voice": {
      "type": "string",
      "enum": ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]
    },
    "speed": {"type": "number", "default": 1.0},
    "model": {
      "type": "string",
      "enum": ["tts-1", "tts-1-hd"]
    }
  }
}
```

## Output Schema

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "path": "/output/voiceover.mp3",
  "voice": "alloy",
  "text_length": 500,
  "size_bytes": 45000
}
```

## Available Voices

| Voice | Description |
| - | - |
| alloy | Neutral, versatile |
| echo | Warm, conversational |
| fable | Expressive, narrative |
| onyx | Deep, authoritative |
| nova | Friendly, upbeat |
| shimmer | Clear, professional |

## Environment Variables

| Variable | Required | Description |
| - | - | - |
| OPENAI\_API\_KEY | Yes | For TTS API |

## Related Tools

* [AI Script Writer](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-script-writer.md)
* [AI Video Merger](https://praison.ai/docs/examples/agent-recipes/creator-suite/ai-video-merger.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.