Skip to main content

ArtificeTranscribe

High-Precision Audio Transcription, Speaker Diarization & Oral History Archiving

Part of the Artifice Suite โ€” Local-First, Model-Agnostic Software Harnesses for Humanities Research.


๐Ÿ›๏ธ Philosophy: The Software Harness vs. The Chatbot

ArtificeTranscribe is an open-source, production-grade speech-to-text and speaker diarization harness built for oral historians, archivists, researchers, and journalists. It is engineered around Joseph Weizenbaumโ€™s anti-ELIZA principle: software should perform deterministic audio processing, alignment, and metadata binding, rather than conversational summary loops.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ArtificeTranscribe Harness โ”‚ โ”‚ โ”‚ โ”‚ 1. Speech Recognition & Diarization (WhisperX + PyAnnote) โ”‚ โ”‚ 2. Forced Word-Level Alignment (Exact Timestamp Sub-segmentation) โ”‚ โ”‚ 3. Interactive Remapping (Audio-Synced Speaker & Transcript Editor) โ”‚ โ”‚ 4. Oral History Archival Export (OHMS XML, TEI XML, PDF, Subtitles) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  1. Deterministic Execution, No Conversational Drift: ArtificeTranscribe never "chats" about audio recordings. It accepts raw interview media, runs forced word-level alignment, binds archival metadata, and outputs precision-timestamped records.
  2. Forced Word-Level Precision: Audio transcripts are only as useful as their timing. ArtificeTranscribe locks every individual word to exact audio offsets, eliminating drift and making audio playback perfectly synchronised with the text.
  3. Archival Integrity & Local Privacy: Confidential oral histories, testimonies, and unpublished field recordings remain 100% offline. Models run on local GPU hardware with strict VRAM hygiene (torch.cuda.empty_cache() and gc.collect() after every job).
  4. Editorial Visual Identity: Built using The New Masses Design System (packages/shared-ui)โ€”a warm, paper-and-ink interface inspired by 1930s radical editorial design and Soviet Constructivism.

โœจ Key Capabilities

1. Advanced Speech & Speaker Diarization Engine

  • WhisperX + PyAnnote Integration: Combines multilingual Whisper transcription with PyAnnote speaker diarization to automatically detect and segment distinct voices (SPEAKER_00, SPEAKER_01).
  • Forced Word-Level Alignment: Dynamic language detection per segment with cached alignment models for millisecond-level word timing.
  • Custom Vocabulary & Initial Prompting: Guides the speech recognition engine toward specialized historical terminology, archival codes, acronyms, and proper nouns.
  • VRAM Lifecycle Hygiene: Automatic model caching paired with aggressive CUDA cleanup post-job to protect hardware health and prevent memory leaks.

2. Archival Oral History Metadata

Attach rich historical provenance metadata directly to transcription jobs:

  • Interviewee & Interviewer full names
  • Interview Date & Location
  • Project Name & Collection ID
  • Access Restrictions & Archival Repository Notes

3. Interactive Web Editing & Audio Sync

  • Synchronised Audio Playback: Interactive media player with real-time transcript segment highlighting as audio plays.
  • Global Speaker Mapping: Instantly rename auto-detected speaker tags (e.g., SPEAKER_00 $\rightarrow$ Dr. Jane Doe) across the entire transcript.
  • In-Browser Review: Inline editing of transcript segments with full edit-history tracking and tag support.

4. Comprehensive 8-Format Export Ecosystem

  • OHMS XML: Oral History Metadata Synchronizer standard for digital humanities archives.
  • TEI XML: Text Encoding Initiative standard for digital scholarly editions.
  • Subtitles (SRT & VTT): Standard subtitle files for video production and documentary editing.
  • JSON: Machine-readable segment data with word-level timestamps and speaker mappings.
  • Markdown (.md): Formatted transcripts ready for static site generators or personal note vaults.
  • PDF: Printable document exports generated via fpdf2.
  • TXT: Clean plain-text transcripts grouped by speaker.

๐ŸŽจ Design System (packages/shared-ui)

All visual elements in ArtificeTranscribe adhere to The New Masses Design System:

  • Palette: Warm cream paper (#f6f3ea), deep warm black ink (#1b1813), Esperanto green accents (#2f7d45), and antique gold highlights (#bf9b30).
  • Typography: Playfair Display (Display/Headings), Libre Baskerville (Body/Transcript text), and Archivo (UI Labels/Buttons).
  • Surface Elevation: Paper-like diffused shadows (shadow-paper), audio player waveform integration, and tactile button interactions.

๐Ÿ“‚ Monorepo Architecture

ArtificeTranscribe is located at apps/artifice-transcribe within the Artifice Suite monorepo and shares core dependencies with partner applications:

artifice-suite/
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ artifice-transcribe/
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ main.py             # FastAPI application factory & lifecycle management
โ”‚       โ”‚   โ”œโ”€โ”€ config.py           # Pydantic settings parser (.env integration)
โ”‚       โ”‚   โ”œโ”€โ”€ db/                 # SQLAlchemy async ORM models (Jobs, Segments, Speakers)
โ”‚       โ”‚   โ”œโ”€โ”€ schemas/            # Request/response validation schemas
โ”‚       โ”‚   โ”œโ”€โ”€ services/           # WhisperX engine wrapper & multi-format export drivers
โ”‚       โ”‚   โ”œโ”€โ”€ api/v1/             # REST API routes & background job orchestration
โ”‚       โ”‚   โ””โ”€โ”€ static/             # Responsive SPA (The New Masses UI, audio player sync)
โ”‚       โ”œโ”€โ”€ tests/                  # Pytest and API verification scripts
โ”‚       โ””โ”€โ”€ README.md
โ””โ”€โ”€ packages/
    โ”œโ”€โ”€ shared-ui/                  # The New Masses CSS tokens & web components
    โ”œโ”€โ”€ model-harness/             # BYOM connectors (Ollama/LM Studio/PyTorch)
    โ””โ”€โ”€ core-types/                # Shared TypeScript & Python data interfaces

๐Ÿš€ Setup & Prerequisites

Prerequisites

  • Python 3.11+
  • PyTorch with CUDA support (Linux/Windows) or Metal Performance Shaders (MPS) support (macOS Apple Silicon).
  • Hugging Face Token (HF_TOKEN): Required for PyAnnote speaker diarization. Accept user conditions on Hugging Face for pyannote/speaker-diarization-3.1 and pyannote/segmentation-3.0.

macOS Apple Silicon Setup Notes

  • To enable Apple Silicon GPU acceleration via PyTorch MPS, set the environment fallback variable before launching:
    export PYTORCH_ENABLE_MPS_FALLBACK=1
    
  • Alternatively, optional support for Apple's native Metal ML framework (mlx-whisper) can be utilized for high-performance Mac speech recognition.

Installation

From the monorepo root:

# Install shared packages and app in editable mode
pip install -e packages/core-types -e packages/model-harness -e packages/shared-ui -e apps/artifice-transcribe

# Configure environment variables
cp apps/artifice-transcribe/.env.example apps/artifice-transcribe/.env

Set your Hugging Face token inside apps/artifice-transcribe/.env:

HF_TOKEN="your_huggingface_access_token_here"

๐Ÿ–ฅ๏ธ Usage & Interfaces

1. Launching the Web Server

Start the FastAPI server (launches web interface at http://127.0.0.1:8000):

python -m artifice_transcribe.main
  • Web UI: http://127.0.0.1:8000
  • Interactive API Documentation (Swagger UI): http://127.0.0.1:8000/docs

๐Ÿ”Œ REST API Endpoints

Method Path Description
POST /api/v1/transcribe Upload audio file with optional metadata (202 Accepted with job_id)
GET /api/v1/jobs/{job_id} Check job status, progress percentage, and oral history metadata
GET /api/v1/jobs/{job_id}/transcript Retrieve structured timestamped transcript segments & tags
PATCH /api/v1/jobs/{job_id}/transcript Edit transcript segment text with change tracking
GET /api/v1/jobs/{job_id}/speakers Get speaker label-to-name mappings
PATCH /api/v1/jobs/{job_id}/speakers Rename speaker labels (e.g., SPEAKER_00 $\rightarrow$ Dr. Jane Doe)
GET /api/v1/jobs/{job_id}/export Export transcript (`format=json
DELETE /api/v1/jobs/{job_id} Delete job, database records, and temporary audio files
GET /health Application health check

โš™๏ธ Configuration Variables

Configure via .env file or environment variables:

Variable Default Description
HF_TOKEN (required) Hugging Face token for PyAnnote diarization models
DATABASE_URL sqlite+aiosqlite:///./data/transcribe.db Async SQLite database path
WHISPER_MODEL base Model size (tiny, base, small, medium, large-v2, large-v3)
DEVICE auto Compute device (cpu, cuda, auto)
UPLOAD_DIR ./uploads Temporary directory for incoming audio files

๐Ÿ› ๏ธ Open-Source Extension Points

We welcome contributions from oral historians, digital archivists, and software engineers!

  1. Archival Metadata Exporters (apps/artifice-transcribe/src/services/exports.py): Implement custom XML or JSON-LD export formatters for regional archival databases.
  2. Audio Preprocessing Drivers: Add noise suppression or bandpass filtering pre-processing stages for low-quality archival field tapes.
  3. Custom Alignment Models: Extend forced alignment model maps for low-resource or ancient languages.

๐Ÿงช Testing

Run backend linters and end-to-end API verification tests:

# Run linters
ruff check apps/artifice-transcribe/

# Run API test suite against an audio file
python apps/artifice-transcribe/tests/test_api.py path/to/sample.wav

Download files

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

Source Distribution

artifice_transcribe-0.1.0.tar.gz (104.3 kB view details)

Uploaded Source

Built Distribution

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

artifice_transcribe-0.1.0-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: artifice_transcribe-0.1.0.tar.gz
  • Upload date:
  • Size: 104.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for artifice_transcribe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4468a5e69bb837ad00178c445745e64ae0f9470d171ba30864ac32cf98851f93
MD5 44fdc7f0098db34c2ffcb05a1b68ded7
BLAKE2b-256 1f9cf8dba01b78699e345512ff0110d7afafc6aed6053f1764c73d5846947222

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Muggwoffin/artifice-suite

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

File details

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

File metadata

File hashes

Hashes for artifice_transcribe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4345f27c47d7e9f721198675fc3c2be286894c69384b34f60f43201acfe796be
MD5 1cfdcafc05735224d4050197e289ad43
BLAKE2b-256 c85d3c60d59a6a3b15cbf3e06c678a14e25a5ef43fc090123de2f803de2658e4

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on Muggwoffin/artifice-suite

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