Skip to main content

Local, evidence-oriented conversation transcription (WhisperX + Anthropic)

Project description

conversa

Local console tool to transcribe spoken conversations with speaker separation (WhisperX + diarization) and post-process them with the Anthropic API: filler-word cleanup, structured summarization, and first-person narrative. Designed for use with evidentiary value (interviews, evidence): the audio never leaves your machine; only the text is, optionally, sent to the language model.

⚠️ Transcripts are automatic and may contain errors. The primary evidence is always the recording.

Requirements

  • Python 3.11+
  • ffmpeg on PATH (brew install ffmpeg)
  • A Hugging Face token with access to pyannote/speaker-diarization-community-1 (accept the terms)
  • An Anthropic API key (console.anthropic.com — pay-as-you-go, different from a Claude Pro/Max subscription)

Installation

python3.11 -m venv .venv && source .venv/bin/activate
pip install -e .
conversa init          # creates conversa.toml and .env.example

Fill in .env with HF_TOKEN and ANTHROPIC_API_KEY.

Usage

conversa run audios/                 # full pipeline (transcribe→clean→summarize)
conversa transcribe audios/my.m4a    # WhisperX only
conversa clean audios/               # cleanup only
conversa summarize audios/           # summary only
conversa rename my-audio --map "A=Ana,B=Beto" --to names/
conversa narrate names/my-audio.limpia.md --narrator Ana --brief \
    --context "September 3, 2024. Participants: Ana and Beto."

Outputs (in output_dir, transcripciones/ by default): <base>.md, <base>.srt, <base>.limpia.md, <base>.resumen.md.

Configuration

conversa.toml (optional) lets you override models, language, speaker range, audio extensions, output folder and tokens. Prompts live in src/conversa/prompts/*.txt and can be edited without touching code.

Language

conversa works with any language WhisperX/Whisper supports (~100 languages). A single language setting (ISO 639-1 code, "es" by default) drives both transcription and the LLM stages: clean, summarize and narrate all write their output in that language.

This is not auto-detected. You must set language to match your audio; conversa always tells Whisper which language to expect instead of letting it guess. Whisper's own auto-detection is disabled on purpose — it's unreliable on noisy, accented phone-call audio, which is exactly this tool's main use case, and a wrong guess silently produces a garbled transcript. If you record audio in English but leave the default language = "es", expect a bad transcription. Set it in conversa.toml:

[general]
language = "en"   # or "pt", "fr", "de", ...

Languages listed in src/conversa/config.py:LANGUAGE_NAMES get a friendly name in the prompt instructions (e.g. "in Spanish"); anything else still works, the model just sees the raw ISO code instead. The Spanish (es) summary headings are hardcoded for exact, tested wording; other languages get the model's own translation of the English headings, which reads naturally but isn't pinned word-for-word.

Security and privacy

Evidentiary, sensitive material. Keep the data flow in mind:

  • The audio never leaves your machine. Transcription (WhisperX + diarization) runs 100% locally.
  • The text IS sent to the Anthropic API in the clean, summarize and narrate stages. If you need nothing to leave the machine, use only conversa transcribe (raw transcription, no LLM). Review Anthropic's API data-retention policy for your case.
  • Secrets: HF_TOKEN and ANTHROPIC_API_KEY go in environment variables or in .env (excluded by .gitignore). Prefer environment variables and run the tool in trusted directories (a foreign .env could inject a different API key).
  • Always review the outputs. Transcription is automatic (ASR errors) and the LLM can be influenced by the audio content itself (prompt injection). For evidence, the primary proof is the recording; rely on the .srt with timestamps to cross-check figures and key phrases.

Next steps

  • Provenance manifest (model/version/hash per output) for chain of custody.
  • --local-only flag / explicit consent before sending text to the LLM.
  • Graphical interface for non-technical users.

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

conversa_transcribe-0.1.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

conversa_transcribe-0.1.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file conversa_transcribe-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for conversa_transcribe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c98abc292bb8a222b0ae1d38cc22deb5c8ca6c298b3de26475183853645ef5a
MD5 fde49fe87c2907c5cd14b5d146d2c469
BLAKE2b-256 336a632a599f94583da21ac927db8e361b1cf057101c621e57b06c39d89716af

See more details on using hashes here.

Provenance

The following attestation bundles were made for conversa_transcribe-0.1.0.tar.gz:

Publisher: publish.yml on salvagit/conversa

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

File details

Details for the file conversa_transcribe-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for conversa_transcribe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 442ead2462d42cdcea1f2c214a8d7508a1cce38c6ea8100bf787e7abb5d4d934
MD5 68a22937488ce2d044858ca215a73bf9
BLAKE2b-256 e6579a01c1989e682ff2f5f66d935d92113c85c261b4056a5ad9e9f6285f9a4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for conversa_transcribe-0.1.0-py3-none-any.whl:

Publisher: publish.yml on salvagit/conversa

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