Skip to content

elevenlabs/examples

Repository files navigation

ElevenLabs Examples Header

Prompt-driven ElevenLabs examples for text-to-speech and speech-to-text. Each project includes:

  • PROMPT.md — instructions for agent-driven generation
  • setup.sh — scaffolds the example/ directory from a shared template
  • example/ — the generated, runnable example with its own README.md

Shared base templates live in templates/ (Next.js, Python, TypeScript). UI styling rules are in DESIGN.md.

The legacy examples/ folder is being deprecated and can be ignored for new work.

Current examples

Generate examples from prompts

The general prompt-runner workflow is in scripts/generate-examples.sh and is exposed as:

pnpm run generate

Prerequisites

  • pnpm
  • claude CLI

Install root dependencies first:

pnpm install

Usage

Run all example prompts:

pnpm run generate

Run only one example:

pnpm run generate speech-to-text/nextjs/realtime

Optional flags:

pnpm run generate -t 1200                     # timeout per prompt in seconds (default: 600)
pnpm run generate -m opus                     # model selection (default: sonnet)
pnpm run generate -v                          # verbose output
pnpm run generate -m opus -t 1200 -v          # combine flags

Try an example directly

Each example has an example/ folder with a README containing setup and run instructions. See the links in Current examples above.

Contributing

We welcome contributions from the community. Install the pre-commit hook before submitting:

pip install pre-commit
pre-commit install

Learn more

License

This project is licensed under the MIT License. See LICENSE for details.