Skip to main content

laidline-livekit

A LiveKit Agents tts_node wrapper. It marks every synthesized rtc.AudioFrame with streaming AudioSeal and writes one Laidline evidence entry per call.

pip install laidline-livekit   # pulls laidline[audio] and livekit-agents>=1.8,<2
from livekit.agents import Agent
from laidline import MarkContext, Marker
from laidline_livekit import mark_audio_frames

marker = Marker.from_config("laidline.yaml")  # in-process: keys, models and evidence stay on your host


class Assistant(Agent):
    async def tts_node(self, text, model_settings):
        return mark_audio_frames(
            marker,
            Agent.default.tts_node(self, text, model_settings),
            ctx=MarkContext(route="livekit:support-agent", tenant="acme"),
        )

What it does

  • mark_audio_frames(marker, frames, *, ctx=None) returns an async iterator of the same frames, marked. Rate, channels and timing stay the same, and each frame keeps its userdata, where LiveKit carries timed transcripts.
  • Each call writes one marked evidence entry with modality: audio, watermark.streaming: true, the payload and issuer id, the duration, and your ctx (default route livekit:tts_node). An iterator that changes sample rate part-way gets one entry per format.
  • The entry is written when the iterator ends. That includes a consumer that stops early (an interrupted turn) and a cancelled task. The wrapped iterator is closed as well.
  • It checks its arguments when you call it: a MarkClient raises TypeError, because the streaming path has no HTTP form. A Marker with watermark.audio.enabled: false raises ValueError.
  • The embedder is AudioSeal's streaming card (watermark.audio.stream_kind: block, the only kind).

What it does not do

  • Audio below 16 kHz (an 8 kHz phone bot) is not marked: it passes through unchanged and the entry says watermark: null, watermark_skipped:rate_below_16k. The streaming mark does not survive below 16 kHz.
  • A stream carries no C2PA manifest (c2pa: null, warning manifest_skipped:streaming). The watermark and the evidence entry are the provenance for live audio.
  • For a recording you store (for example egress to a file), sign the file itself with marker.mark_audio(..., fmt="wav" | "flac" | "mp3" | "m4a"). This embeds a manifest and adds the batch mark. Laidline's /v1/audio/speech proxy in streaming mode stores a signed twin of a response only when watermark.audio.store_signed_twin is enabled and only for a stream that completed.

Survival

Measured 2026-09-27 on LibriSpeech test-clean, 500 speech clips. The detection threshold is 0.39, which gave a 0.75 % false-positive rate. Figures are the share of clips on which the streaming-mode mark (the one this wrapper embeds) is still detected:

Transform Streaming mode
Opus 24 kbps 100 %
Opus 48 kbps 100 %
MP3 64 kbps 100 %
AAC 64 kbps 100 %
G.711 mu-law 0 %
8 kHz resampling 0 %
EnCodec 6 kbps 100 % detected, 0 % exact issuer
Mimi 0 %

The streaming mark survives an offline Opus transcode at 24 and 48 kbps (100 percent on 500 LibriSpeech clips); no WebRTC session, packet loss or jitter was tested. It does not survive a simulated phone leg (G.711 codec simulation, the codec of LiveKit SIP calls to the PSTN). The streaming mark was not run over a real call. For phone deployments, provenance comes from the evidence entry and from C2PA on stored recordings, not from the watermark. For comparison, the batch (non-streaming) mark that mark_audio embeds survives simulated G.711 and 8 kHz at 100 %, and a real call with the batch mark: 99 % (100 Twilio number-to-number calls recorded at the callee, G.711 8 kHz, carrier routing unconfirmed and possibly on-net, measured 2026-09-27).

Mean embed SNR is 17.4 dB (5th percentile 8.7 dB), which is audible on some voices. Listen to your own voices before you ship.

The full numbers and method are in the benchmarks page ("Audio robustness"), and what was tested, and how, in https://laidline.com/docs/integrations/livekit. Streaming sessions, detection and the operating threshold are in https://laidline.com/docs/integrations/audio.

Metadata

Release files for laidline-livekit 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laidline-livekit 1.0.4
File Size Uploaded Provenance Actions
laidline_livekit-1.0.4.tar.gz 12.2 kB With provenance Details for laidline_livekit-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for laidline-livekit 1.0.4
File Interpreter ABI Platform Actions
laidline_livekit-1.0.4-py3-none-any.whl Python 3 none any Details for laidline_livekit-1.0.4-py3-none-any.whl

Total release size: 25.6 kB

Release files / laidline_livekit-1.0.4.tar.gz

Download URL laidline_livekit-1.0.4.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a05fe901c2824a76bfe44f4b7d5a973624845a9682d80bc8b86a314e94fa0d09
BLAKE2b-256 checksum
How to use checksums
4faf71fbbd038872e8c29a47dd95e1c3c958f164fa5f9f7b639e1b56f370fcc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / laidline_livekit-1.0.4-py3-none-any.whl

Download URL laidline_livekit-1.0.4-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2459cfc1510ad19c407afe8113dd02c2272fefb529b37637e850dd18f0ed30ba
BLAKE2b-256 checksum
How to use checksums
d26d2b1f68ad7790aa1cd26ff89f7ae3e249be7c30af579dfb9a7ac02f18b9a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for laidline-livekit 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for laidline_livekit-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page