Bolna

View as Markdown

This guide walks you through configuring Smallest AI as the TTS and STT provider in Bolna, an open-source platform for building and deploying voice agents over telephony. Bolna lets you pick a provider independently per capability — use Smallest AI for both TTS and STT, or mix it with other providers, straight from Bolna’s dashboard Provider dropdowns or via the SDK.

Prerequisites


Setup

Bolna offers two ways to configure providers: the dashboard’s Audio tab (no code), or the Python SDK directly.

Dashboard

In your agent’s Audio tab:

  • Speech-to-Text: choose Smallest from the Provider dropdown and select Pulse as the model.
  • Text-to-Speech: choose Smallest from the Provider dropdown and select Lightning v3.1 or Lightning v3.1 Pro as the model.
Bolna Audio tab with Smallest selected as the Speech-to-Text provider and Smallest Pulse as the model

Code (SDK)

Set provider="smallest" on both the Transcriber and Synthesizer when building an Assistant:

1from bolna.models import Transcriber, Synthesizer, SmallestConfig
2
3# Speech to text (Pulse)
4transcriber = Transcriber(
5 provider="smallest",
6 model="pulse",
7 language="en",
8 stream=True,
9)
10
11# Text to speech (Lightning)
12synthesizer = Synthesizer(
13 provider="smallest",
14 provider_config=SmallestConfig(
15 voice_id="<voice_id>",
16 voice="<voice_name>",
17 language="en",
18 model="lightning_v3.1", # or lightning_v3.1_pro
19 ),
20 stream=True,
21 audio_format="wav",
22)

Set SMALLEST_API_KEY in your environment — see the provider table in README.md. You can also pass a key directly per-agent via transcriber_key / synthesizer_key.

Always pass model="pulse" explicitly on Transcriber. Bolna’s top-level Transcriber.model field defaults to "nova-2", and that default is passed straight through regardless of provider — leaving model unset with provider="smallest" sends an invalid model to Smallest AI.

Configuration Reference

The fields below apply to the SDK path. The dashboard’s Audio tab exposes a subset of these (Provider, Model, Language) as dropdowns for both STT and TTS.

FieldCapabilityDefaultDescription
Transcriber.providerSTTSet to "smallest" to route to Smallest AI
Transcriber.modelSTT"pulse" in the Smallest provider class, but "nova-2" at the Transcriber field level — always set it explicitlyOnly pulse is wired to the realtime endpoint
Transcriber.languageSTT"en" in the Smallest provider class if unsetISO language code
Transcriber.sampling_rate / encodingSTTn/aAlways auto-set from the telephony provider (mulaw/8kHz, linear16/8kHz, or linear16/16kHz — see Notes); cannot be overridden via config
Transcriber.endpointingSTT400 (ms)Silence duration before finalizing an utterance
Transcriber.keywordsSTTNoneAccepted by the config but currently a no-op — not yet wired into the Smallest AI request
SmallestConfig.modelTTS— (required)lightning_v3.1 (standard pool) or lightning_v3.1_pro (premium pool) — both pass straight through to the API
SmallestConfig.voice_id / voiceTTS— (required)Catalog or cloned voice, scoped to the selected model
SmallestConfig.languageTTS— (required)Language code — see the Lightning voices & languages guide
Synthesizer.audio_formatTTS"pcm" at the field level, but Bolna’s Smallest synthesizer always returns wavAudio container format

Notes

  • Bolna routes TTS requests to https://api.smallest.ai/waves/v1/tts (HTTP) / wss://api.smallest.ai/waves/v1/tts/live (streaming), and STT requests to wss://api.smallest.ai/waves/v1/stt/live.
  • Telephony audio encoding/sample rate for STT is unconditionally auto-configured per provider: mulaw @ 8kHz for Twilio and SIP trunks, linear16 @ 8kHz for Exotel/Plivo, linear16 @ 16kHz for web calls.
  • Keyword boosting in the dashboard’s STT settings doesn’t apply to Smallest AI per Bolna’s Audio tab docs — consistent with Transcriber.keywords being a no-op for Smallest AI at the SDK level too.
  • For issues with the Smallest AI integration in Bolna, open an issue in the Bolna repository or contact us on Discord.