AbsoluteJS

@absolutejs/voice-smallest

@absolutejs/voice-smallestv0.0.1-beta.6betaVoice & Media

Smallest AI text-to-speech adapter for @absolutejs/voice

#Installation

BASH
bun add @absolutejs/voice-smallest

#Capabilities

Overview

Smallest AI text-to-speech adapter for @absolutejs/voice.

Wraps Smallest AI's /api/v1/{model}/get_speech HTTP endpoint behind voice's TTSAdapter seam. Lightning + Lightning-v2 models, English + Hindi.

Options

Option — Required — Default — Notes

apiKey — yes — — — Smallest API key, sent as Authorization: Bearer .

voiceId — yes — — — Smallest voice id.

Show 6 more

model — no — lightning — Selects the URL path segment (/api/v1/{model}/get_speech).

sampleRate — no — 24_000 — Forwarded as sample_rate. Adapter emits PCM s16le frames at this rate.

language — no — — — en, hi.

speed, similarity, consistency, enhancement — no — — — Forwarded to Smallest.

baseUrl — no — https://waves-api.smallest.ai — Override for staging.

fetch — no — globalThis.fetch — Inject for tests; opportunistic HTTP/2 multiplexing on outbound HTTPS.

Notes

Whitespace-only send() is a no-op.

Adapter requests add_wav_header: false so the body is raw PCM.

session.close(reason) aborts in-flight requests and refuses further sends.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/voice-smallest through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/voice-smallest version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/voice-smallest example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Use

Partial snippet

Working example for Use.

TS
import { voice } from "@absolutejs/voice";
import { smallest } from "@absolutejs/voice-smallest";

const app = voice({
  tts: smallest({
    apiKey: process.env.SMALLEST_API_KEY!,
    voiceId: "george",
    // optional:
    model: "lightning", // default; or 'lightning-v2'
    sampleRate: 24_000, // default
    language: "en",
    speed: 1.0,
    similarity: 0.5,
    consistency: 0.5,
    enhancement: 1,
  }),
});

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/voice-smallest@absolutejs/voice-smallest/manifest@absolutejs/voice-smallest/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build ./src/index.ts ./src/manifest.ts --outdir dist --target bun --external @absolutejs/manifest --external '@absolutejs/manifest/*' --external @absolutejs/voice --external '@absolutejs/voice/*' --external @sinclair/typebox --external '@sinclair/typebox/*' && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit
bun run check:packagebun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts
bun run formatprettier --write "./**/*.{js,ts,json,md}"
bun run testbun test
bun run typecheckbun run tsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

5 symbols
smallestexportPermalinkSource
TS
smallest
Exported from @absolutejs/voice-smallest