Skip to main content

Recording lifecycle and transcription for the Stapel framework

Project description

stapel-recordings

Recording lifecycle and transcription for the Stapel framework — composable Django apps that deploy as a monolith or as microservices without changing module code.

Owns the lifecycle capture/upload → storage → transcribe → summarize: Recording + Speaker + Segment (the unified transcript), presigned / multipart upload sessions, and a data-driven, outbox-backed processing pipeline with retry, DLQ and reconcile.

Speech-to-text and summarization are delegated to stapel-agent via the llm.transcribe / llm.summarize comm Functions — this module does not implement STT or LLM calls. Object storage goes through a swappable seam.

Install

pip install stapel-recordings          # default: Django-storage backend
pip install "stapel-recordings[s3]"    # + boto3 S3/MinIO backend
INSTALLED_APPS = [
    # ...
    "stapel_core.django.outbox",   # transactional outbox (pipeline reliability)
    "stapel_recordings",
]

# urls.py
path("recordings/", include("stapel_recordings.urls"))

The transcribe / merge stages call stapel-agent by comm name — install and configure stapel-agent (or provide llm.transcribe / llm.summarize providers) for the pipeline to complete. The default convert stage needs ffmpeg/ffprobe on PATH (or set NORMALIZER to passthrough_normalize).

The pipeline is data you can edit

STAPEL_RECORDINGS = {
    # Reorder / subset / insert stages — no fork:
    "PIPELINE": ["convert", "transcribe", "redact_pii", "merge"],
    # Replace or add stage handlers (merge-over-builtins; None removes):
    "STAGES": {"diarize": "myproject.stages.PyannoteDiarizer"},
    # Or source the list at runtime (DB / per-workspace / per-recording):
    "PIPELINE_RESOLVER": "myproject.pipelines.resolve",
    # Swap the object store:
    "STORAGE": "stapel_recordings.storage.S3Backend",
}

A generic driver runs the resolved stage list, advancing the status machine and emitting the next stage through the outbox. See MODULE.md for the stage contract and worked examples.

Settings

All configuration lives in the STAPEL_RECORDINGS namespace (dict setting, flat setting, or env var — resolved lazily). See the full table in MODULE.md. Highlights: PIPELINE, STAGES, PIPELINE_RESOLVER, STORAGE, NORMALIZER, SUMMARIZE_ENABLED, MAX_STAGE_RETRIES.

comm surface

Kind Name Contract
Action (emit) recording.uploaded, recording.stage_completed, recording.completed, recording.failed pipeline lifecycle (public)
Action (consume) recording.uploaded, recording.stage, user.deleted driver + GDPR erase
Function (call) llm.transcribe, llm.summarize provided by stapel-agent

Operations

python manage.py recordings_reconcile --once   # re-drive stuck recordings

Development

pip install -e . && pip install pytest pytest-django ruff jsonschema djangorestframework
./setup-hooks.sh
pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stapel_recordings-0.1.2.tar.gz (52.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stapel_recordings-0.1.2-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file stapel_recordings-0.1.2.tar.gz.

File metadata

  • Download URL: stapel_recordings-0.1.2.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stapel_recordings-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e9ba0f118c25a5632a7ec319ba54af423a85135a728d947e11b2dc15a73ca5e7
MD5 08b9842e19044b0f6e91c6da087de100
BLAKE2b-256 dd3a4b6ac1abe7f4b46e64b87af22d27389a6c58a9db23ccd5aa2a1af3172f82

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_recordings-0.1.2.tar.gz:

Publisher: publish.yml on usestapel/stapel-recordings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stapel_recordings-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stapel_recordings-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e140cd6be5a60cf00f8b127fe9a07e8839fa201c1fe27d3c754e34485a6585a2
MD5 187f4a4902b54f2d0eb341a35c13eb93
BLAKE2b-256 9b0461147c6df09c5a5c2bd0d66d641d3ff47abf59910f5c63e01f06e3680e34

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapel_recordings-0.1.2-py3-none-any.whl:

Publisher: publish.yml on usestapel/stapel-recordings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page