Build on the supported package contract
Use @absolutejs/voice-elevenlabs through its supported public entry points.
@absolutejs/voice-elevenlabsv0.0.26betaVoice & MediaElevenLabs text-to-speech adapter for @absolutejs/voice
bun add @absolutejs/voice-elevenlabsElevenLabs text-to-speech adapter for @absolutejs/voice.
The adapter uses ElevenLabs' official streaming text-to-speech endpoint and emits normalized audio events with PCM chunks.
If you need a warm persistent TTS session for lower turn startup latency, you can opt into ElevenLabs' WebSocket transport:
HTTP chunked audio stream -> audio
warm WebSocket stream-input session -> audio
request failures -> normalized error
adapter close -> normalized close
This adapter currently supports PCM output formats for compatibility with @absolutejs/voice audio events.
Supported options include:
apiKey
voiceId
modelId
outputFormat
languageCode
voiceSettings
seed
enableLogging
optimizeStreamingLatency
transport
websocket
Set ELEVENLABS_API_KEY in your runtime environment, or pass the key explicitly in the adapter config.
ElevenLabs references used for this adapter design:
https://elevenlabs.io/docs/api-reference/text-to-speech
https://elevenlabs.io/docs/api-reference/streaming
https://elevenlabs.io/docs/capabilities/text-to-speech
Outcomes
Use @absolutejs/voice-elevenlabs through its supported public entry points.
Hardening checklist
Follow in order
Working example for Setup.
import { elevenlabs } from "@absolutejs/voice-elevenlabs";
const tts = elevenlabs({
apiKey: process.env.ELEVENLABS_API_KEY!,
voiceId: "JBFqnCBsd6RMkjVDRZzb",
modelId: "eleven_flash_v2_5",
outputFormat: "pcm_16000",
});Supported entry points declared by this package manifest.
Package entry point declared in package.json.
Scripts declared by this package manifest.
Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.