any example on how to use eleven labs stt model sc...
# ask-ai
g
any example on how to use eleven labs stt model scrive v2 realtime model for voice agent ?
t
Thanks for reaching out, Vrishabh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll walk you through two simple ways to use the ElevenLabs Scribe V2 Realtime STT model (
elevenlabs/scribe_v2_realtime
) with a LiveKit voice agent: 1) LiveKit Inference (no external API key needed) and 2) the ElevenLabs plugin (uses your ElevenLabs API key). Which one you pick depends on whether you want LiveKit to host the inference or call ElevenLabs directly. If you want me to show a full voice-agent example (with TTS, VAD, or LLM integration), tell me which language (Python or Node.js) and whether you prefer LiveKit Inference or the ElevenLabs plugin. Option 1 — LiveKit Inference (recommended for simplicity) • No ElevenLabs API key required; LiveKit hosts the model. • Quick Python example:
Copy code
from livekit.agents import AgentSession, inference

session = AgentSession(
    stt=inference.STT(
        model="elevenlabs/scribe_v2_realtime",
        language="en"  # optional: set language code or omit for auto-detect
    ),
    # add tts=..., llm=..., vad=... as needed
)
• Quick Node.js / TypeScript example:
Copy code
import { AgentSession } from '@livekit/agents';

const session = new AgentSession({
  stt: "elevenlabs/scribe_v2_realtime:en", // optional ":<lang>"
  // add tts, llm, vad, etc.
});
Option 2 — ElevenLabs plugin (use your own ElevenLabs API key) • Use this if you need direct ElevenLabs features or want to supply your own API key. • Install the plugin (Python example):
Copy code
uv add "livekit-agents[elevenlabs]~=1.4"
• Set your API key in your environment:
Copy code
ELEVEN_API_KEY=your_api_key_here
• Python example using the plugin:
Copy code
from livekit.plugins import elevenlabs
from livekit.agents import AgentSession

session = AgentSession(
    stt=elevenlabs.STT(
        model="scribe_v2_realtime"
        # extra_kwargs={...} can pass model-specific options
    ),
    # add tts, llm, vad...
)
Notes and tips • Model name: use
elevenlabs/scribe_v2_realtime
or
scribe_v2_realtime
(plugin) — not “Scrive.” • Language: you can optionally pass a language code (e.g.,
en
) or rely on automatic language detection. • With the plugin, you can pass additional model-specific options via
extra_kwargs
to access ElevenLabs realtime STT features. • LiveKit Inference pricing applies when using hosted inference. If you want, I can: • Provide a full working voice-agent example (Python or Node.js) that includes microphone capture, VAD, and streaming audio to STT and TTS; or • Show how to pass
extra_kwargs
to enable specific ElevenLabs realtime options; or • Help tune latency / chunk sizes for real-time transcription. Which language and option should I show a complete example for? Sources: ElevenLabs STT | LiveKit Documentation
g
if i use livekit inference does livekit take their marku pcahrge or not ?
t
Thanks — quick answer: LiveKit does not add a markup when you use LiveKit Inference for the ElevenLabs Scribe V2 Realtime STT model. You are billed on a pay-as-you-go basis at the provider prices listed on the LiveKit Inference pricing page, so you pay the base ElevenLabs cost through LiveKit without an added LiveKit markup. If you'd like, I can: • Link the LiveKit Inference pricing page for your region, • Estimate costs for a sample usage pattern (minutes/hour), or • Compare that to using the ElevenLabs plugin with your own API key so you can decide which approach is cheaper for your workload. Which would help most? Sources: Introducing LiveKit Inference: A unified model interface for voice AI