Vercel AI SDK
Use Smallest AI as a speech and transcription provider in the Vercel AI SDK. Generate speech and transcribe audio with a few lines of code.
Installation
Setup
Get your API key from waves.smallest.ai and set it as an environment variable:
Text-to-Speech
Supported models: lightning-v3.1 (recommended — 44.1 kHz, natural expressive speech) and lightning-v2 (16 languages, voice cloning).
Speech-to-Text
Next.js API Route Example
Create a TTS endpoint in your Next.js app:
Play it in the browser:
Provider Options
TTS Options
STT Options
Available Voices
80+ voices across multiple languages. Popular voices:
Fetch the full voice list programmatically:

