Day 0 support for Google Gemini 3.1 Flash TTS Try it now →
Providers

Smallest AI

Smallest AI Lightning text-to-speech models with multilingual voices and configurable output formats.

Prefixsmallest-ai
Default modellightning-v3.1
Env varSMALLEST_API_KEY
Official docsdocs.smallest.ai

Models

ModelStreamingAudio TagsVoice CloningLanguagesNotes
lightning-v3.1NoNoNoen, hi, es, taLightning real-time TTS; 80+ voices

Usage

import { generateSpeech } from "@speech-sdk/core"

const result = await generateSpeech({
  model: "smallest-ai/lightning-v3.1",
  text: "Hello from SpeechSDK!",
  voice: "magnus",
})

magnus is the SDK's default voice when none is supplied. Smallest AI exposes 80+ voices — see their voice library for the full list.

Provider Options

await generateSpeech({
  model: "smallest-ai/lightning-v3.1",
  text: "Hello!",
  voice: "magnus",
  providerOptions: {
    language: "en", // "en" | "hi" | "es" | "ta" | "auto" (default)
    output_format: "wav", // "pcm" | "wav" | "mp3" | "mulaw"
    sample_rate: 24_000, // 8000 | 16000 | 24000 | 44100
    speed: 1.0, // 0.5 – 2.0
  },
})

Output Formats

lightning-v3.1 advertises native pass-through for wav, mp3, and pcm via the output formats option:

await generateSpeech({
  model: "smallest-ai/lightning-v3.1",
  text: "Hello!",
  voice: "magnus",
  output: { format: "mp3" },
})

Custom Configuration

import { generateSpeech } from "@speech-sdk/core"
import { createSmallestAI } from "@speech-sdk/core/providers"

const smallestAI = createSmallestAI({
  apiKey: process.env.SMALLEST_API_KEY,
})

const result = await generateSpeech({
  model: smallestAI("lightning-v3.1"),
  text: "Hello!",
  voice: "magnus",
})

On this page