BlyntBlynt API
Quickstarts

LiveKit integration

Use Blynt as the speech-to-text service inside a LiveKit Agents voice pipeline.

LiveKit Agents is a framework for building real-time voice agents. The livekit-blynt plugin lets you use Blynt as the speech-to-text (STT) service in a LiveKit AgentSession, so transcription runs through the Blynt Real-time API while the rest of your agent (LLM, TTS, transport) stays unchanged.

Under the hood the plugin opens a deployment-scoped, Bearer-authenticated WebSocket to the Real-time API and drives manual turn-taking from LiveKit's VAD speaking events.

livekit-blynt is maintained by Blynt and ships as its own package.

Install

# Using uv
uv add livekit-blynt

# Using pip
pip install livekit-blynt

Configure the STT service

The plugin connects to a Blynt deployment, so you must supply a deployment_id and an api_key. Both can be passed directly or read from the BLYNT_DEPLOYMENT_ID and BLYNT_API_KEY environment variables.

from livekit_blynt import BlyntSTT, BlyntSTTOptions

# Pass credentials directly...
stt = BlyntSTT(
    options=BlyntSTTOptions(
        deployment_id="680989...",  # or set BLYNT_DEPLOYMENT_ID
        api_key="sk-...",           # or set BLYNT_API_KEY
    ),
)

# ...or read both from the environment
stt = BlyntSTT(options=BlyntSTTOptions())

See Connection and Authentication for more on deployments and API keys.

Session context

Pass a BlyntSessionContext to bias recognition for the whole session. Facts and hints are sent once on start_session and apply to every turn. They combine with any per-turn turnContext.

from livekit_blynt import BlyntSTT, BlyntSTTOptions, BlyntSessionContext, Fact, DeclaredValues, STTLanguages

stt = BlyntSTT(
    options=BlyntSTTOptions(
        language=STTLanguages.FR,
        session_context=BlyntSessionContext(
            facts=[Fact(name="customerName", value="Jean Dupont")],
            hints=[
                DeclaredValues(
                    name="carBrand",
                    values=["Renault", "Peugeot", "Citroën", "Toyota", "Volkswagen"],
                )
            ],
        ),
    )
)
  • facts: a list of Fact objects (name and value, optional description).
  • hints: a list of DeclaredValues (values the user is expected to say).

Omit session_context entirely if you have no session-level biasing.

Set up turn-taking

The Real-time API runs in manual turn-taking mode: the plugin sends start_turn when the user starts speaking and end_turn when they stop. The plugin itself is turn-taking-agnostic and reacts to LiveKit VAD speaking events (user_state_changed, or user_started_speaking / user_stopped_speaking on older Agents versions). A VAD must be attached to the AgentSession, and you must call stt.register_session(session) after constructing the session. If those events never fire, no turns are ever sent and you get no transcripts.

At a minimum you need a Voice Activity Detector (VAD). LiveKit's Silero plugin is the usual choice.

Voice Activity Detection (Silero)

Use LiveKit's Silero VAD and set the end-of-turn delay with min_silence_duration (how long the speaker must stay silent before a turn is considered finished):

from livekit.agents import AgentSession
from livekit.plugins import silero
from livekit_blynt import BlyntSTT, BlyntSTTOptions

stt = BlyntSTT(options=BlyntSTTOptions())
session = AgentSession(
    stt=stt,
    vad=silero.VAD.load(min_silence_duration=0.5),
    # ... llm, tts
)
stt.register_session(session)

The VAD requires the silero extra (livekit-agents[silero]). A shorter min_silence_duration makes the bot more responsive but risks cutting the speaker off mid-sentence; a longer value is more forgiving but adds latency.

Note: given the ASR processes audio between VAD speech start and speech end, it is recommended to use a VAD with a min_silence_duration of at least 0.5s to avoid splitting the utterance into multiple Blynt decodes.

Add it to an agent session

BlyntSTT extends LiveKit's STT, so it drops into any AgentSession where an STT plugin is expected:

from livekit.agents import Agent, AgentSession
from livekit.plugins import openai, silero
from livekit_blynt import BlyntSTT, BlyntSTTOptions

stt = BlyntSTT(
    options=BlyntSTTOptions(
        deployment_id="645...",
        api_key="sk-...",
    )
)

session = AgentSession(
    stt=stt,
    llm=openai.LLM(model="gpt-4.1-mini"),
    tts=openai.TTS(model="gpt-4o-mini-tts", voice="alloy"),
    vad=silero.VAD.load(min_silence_duration=0.5),
)
stt.register_session(session)

await session.start(room=ctx.room, agent=Agent(instructions="..."))

The service emits LiveKit INTERIM_TRANSCRIPT events from Blynt's turn_partial events and a FINAL_TRANSCRIPT from each turn_ended event.

Configuration options

BlyntSTTOptions accepts:

  • deployment_id (optional): Blynt deployment id to run the session against. Falls back to the BLYNT_DEPLOYMENT_ID environment variable.
  • api_key (optional): Blynt API key for Bearer auth. Falls back to the BLYNT_API_KEY environment variable.
  • session_context (optional): a BlyntSessionContext with facts (Fact) and hints (DeclaredValues), sent once on start_session.

Requirements

  • Python >= 3.12
  • livekit-agents >= 1.2 (with the silero extra for the VAD)
  • websockets >= 14.0

On this page