PatternsSDK API

Transcribe Audio (ElevenLabs)

Loading pattern preview

Loading preview…

Problems solved

Technical challenges this implementation handles out of the box.
  • Transcribe uploaded audio with ElevenLabs speech-to-text
  • Return plain transcript text from a simple API route
  • Demonstrate ElevenLabs transcription through the AI SDK

Use cases

Products and workflows this pattern is designed to support.
  • ElevenLabs transcription playgrounds
  • Podcast transcript generators
  • Voice memo to text converters
  • AI SDK ElevenLabs STT onboarding demos

Setup

Requirements, wiring steps, and what this pattern adds to your project.

Getting started

Pick how you want to pull this pattern in — then wire env vars and routes the same way.

  1. 1

    Install from the preview toolbar

    Shadcn Icon

    Copy the install command above and run it in your project — Pro patterns include a short-lived token.

  2. 2

    Add environment variables to .env.local

    ELEVENLABS_API_KEY

  3. 3

    Customize the agent and tool files

    Adapt prompts, tools, and stop conditions for your product — Copy for AI in the toolbar helps seed that work.

  4. 4

    Run your dev server and open the pattern route

    Install dependencies if needed, then start the app and verify responses.

Environment variables

Capabilities

AI SDK APIs

experimental_transcribe

Providers

ElevenLabs

Files added

3 files
  • app/page.tsx
  • app/layout.tsx
  • README.md

Dependencies

16 total

npm packages

10
AISDK@hookform/resolversUpstashlucide-reactmotionNext.jsReactreact-hook-formsonnerZod

Shadcn IconRegistry components

6
alertbuttonformselecttextareatooltip

Critical files

  • lib/actions.ts

    Server action implementing audio transcription using ElevenLabs via AI SDK experimental_transcribe. Handles FormData audio processing, diarization, word-level timestamps, and segment transformation.

Requirements

Complexity
Beginner