Skip to content

Documentation / Guides / Recording and GCS

Coordinate recording with GCS

VAANI coordinates bounded recording start/observe/stop. The deployment owns consent, legality, storage, retention, credentials, and access.

Install and configure

python -m pip install "vaani[recording-gcs]"
from vaani.adapters.recording.gcs import (
    GCSRecordingConfig,
    LiveKitGCSRecordingAdapter,
)

recording = LiveKitGCSRecordingAdapter(
    GCSRecordingConfig(
        adapter_id="recording-gcs",
        bucket_name="private-call-recordings",
        credential_source=recording_credentials,
        object_prefix="voicebot/",
        delete_object_on_stop=False,
    )
)

object_prefix must be relative and cannot traverse parent directories. Bucket names and credentials should come from protected deployment configuration.

The credential source may resolve a tested backend or the live binding: room_name, livekit_url, livekit_api_key, livekit_api_secret, and gcp_credentials_json. Never place those values in docs, profile IDs, or results.

The repository's optional smoke reads VAANI_GCS_BUCKET, VAANI_GCS_ROOM_NAME, LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and GOOGLE_APPLICATION_CREDENTIALS_JSON; region may be supplied as VAANI_GCS_REGION. These are smoke/deployment conventions, not ambient reads by the adapter.

Choose requirement per call

RecordingPolicy(RecordingRequirement.DISABLED, None)
RecordingPolicy(RecordingRequirement.BEST_EFFORT, "recording-gcs")
RecordingPolicy(RecordingRequirement.REQUIRED, "recording-gcs")
  • BEST_EFFORT: retain failure evidence and continue.
  • REQUIRED: start must be confirmed before greeting; start failure or later loss forces termination.

The result contains only an opaque RecordingArtifactReference, never raw audio, a durable public URL, signed URL, bucket name, or credential.

Live status

The repository has an isolated recording_gcs_smoke.py, but missing LiveKit and GCS credentials are deferred in the current environment. Offline tests cover coordination and cleanup; no live recording success is claimed here.

Next: result publishing or production readiness.