Skip to main content

@kithjs/elizaos

Drop-in voice plugin for ElizaOS agents. Replaces @elizaos/plugin-elevenlabs with Kith's full voice pipeline.

Install

bun add @kithjs/elizaos

Register

In your agent's character file:

import kithVoice from "@kithjs/elizaos";

export default {
name: "MyAgent",
plugins: [kithVoice],
// ...
};

Configure

In your .env:

ELEVENLABS_XI_API_KEY=sk_your_key
ELEVENLABS_VOICE_ID=kPzsL2i3teMYv0FxEYQ6

What It Replaces

Featureplugin-elevenlabs@kithjs/elizaos
Sentence chunkingNo (raw text dump)Yes (natural boundaries)
Slang expansionNo4 built-in dicts
PronunciationNoPer-character overrides
Emoji handlingRead aloudStripped, emotion events
Laugh tagsNov3 [laughs] / [giggles]
Multi-provider fallbackNoElevenLabs + OpenAI + Cartesia
Character profilesNoVoiceCharacter JSON
Text transformsNoCustom pipeline

No Python Required

Unlike the full Kith stack (which uses a Python Pipecat sidecar), the ElizaOS plugin uses ElevenLabsDirectAdapter — a lightweight TypeScript-native adapter that calls the ElevenLabs SDK directly. No Python, no sidecar, no extra processes.

Standalone Use

You can use the synthesis function without ElizaOS:

import { synthesizeWithKith } from "@kithjs/elizaos";

const { audio, emotions } = await synthesizeWithKith(
"Hey! That was fire 🔥 lol ngl",
{
apiKey: process.env.ELEVENLABS_XI_API_KEY,
voiceId: "kPzsL2i3teMYv0FxEYQ6",
modelId: "eleven_v3",
enableSlang: true,
enableEmoji: true,
},
);
// audio: KithEvent[] with tts_audio_chunk events
// emotions: KithEvent[] with emotion_state events

Environment Variables

VariableDefaultDescription
ELEVENLABS_XI_API_KEYElevenLabs API key (ElizaOS convention)
ELEVENLABS_VOICE_IDVoice ID
ELEVENLABS_MODEL_IDeleven_v3TTS model
KITH_ENABLE_SLANGtrueEnable slang expansion
KITH_ENABLE_EMOJItrueEnable emoji-to-emotion
KITH_CHARACTER_FILEPath to VoiceCharacter JSON