Metadata-Version: 2.4
Name: roshi-transcription-mcp
Version: 0.1.0
Summary: Roshi's Transcription MCP — Local GPU NVIDIA Nemotron-3-Diarization & Multi-Pass ASR (Nemotron-3.5 + Parakeet TDT v3 + optional Whisper) MCP server, plugin, and CLI with speaker name/title identification and California court-reporter transcript generation (PDF, DOCX, line-numbered MD/TXT, SRT)
Author: RIAEvangelist (Roshi)
License-Expression: MIT
Project-URL: Homepage, https://riaevangelist.github.io/roshi-transcription-mcp/
Project-URL: Documentation, https://riaevangelist.github.io/roshi-transcription-mcp/
Project-URL: Repository, https://github.com/RIAEvangelist/roshi-transcription-mcp
Project-URL: Issues, https://github.com/RIAEvangelist/roshi-transcription-mcp/issues
Keywords: diarization,nemotron,nemo-speech,parakeet,transcription,court-reporter,mcp,mcp-server,model-context-protocol,antigravity,claude,codex
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Legal Industry
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=2.0.0
Requires-Dist: reportlab>=4.2.0
Requires-Dist: python-docx>=1.1.0
Requires-Dist: imageio-ffmpeg>=0.5.1
Dynamic: license-file

<!-- mcp-name: io.github.RIAEvangelist/roshi-transcription-mcp -->

<p align="center">
  <a href="https://riaevangelist.github.io/roshi-transcription-mcp/"><img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/assets/roshi-transcription-mcp-header.png" alt="Roshi's Transcription MCP — Roshi meditating in a classic mahogany courtroom with glowing multi-speaker audio waveforms and court transcript" width="100%"></a>
</p>

<h1 align="center">Roshi's Transcription MCP</h1>

<p align="center">
  <strong>100% Local GPU Court-Grade Transcription, Speaker Identification &amp; Audio Verification</strong><br>
  Antigravity Plugin · Claude Code &amp; Codex Plugin · Open MCP 2.x Server · Standalone CLI
</p>

<p align="center">
  <a href="https://riaevangelist.github.io/roshi-transcription-mcp/"><strong>Live Documentation Site</strong></a> ·
  <a href="https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks.html"><strong>Real Courtroom Benchmark (5 Models)</strong></a> ·
  <a href="https://riaevangelist.github.io/roshi-transcription-mcp/workflows.html"><strong>Plain-English Workflows</strong></a> ·
  <a href="https://pypi.org/project/roshi-transcription-mcp/"><strong>PyPI (<code>uvx</code>)</strong></a> ·
  <a href="https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.RIAEvangelist/roshi-transcription-mcp"><strong>Official MCP Registry</strong></a> ·
  <a href="https://glama.ai/mcp/servers/RIAEvangelist/roshi-transcription-mcp"><strong>Glama</strong></a>
</p>

---

## Built for People Who Need Defensible, Accurate Transcripts

No cloud uploads. No per-minute SaaS billing. No confidential, sealed, juvenile, medical, or evidentiary audio ever leaving your machine.

### Who It's For & What It Solves

| Audience | What You Get Out of the Box |
|---|---|
| **Court Reporters (CSRs) & Transcriptionists** | Turn hours of courtroom FTR/digital recordings into clean, **25- or 28-line bordered Courier monospace drafts** (PDF & editable DOCX) with **exact shared `Page:Line` Word Indexes**, speaker attribution, instant audio playback of any turn or phrase (`listen_to_section`), one-command word/speaker fixes, and **fully toggleable** cover badges, `Prepared By` lines, system specs, and provenance pages so your final reviewed transcript matches your exact certification standards. |
| **Pro Se Litigants & Legal Aid** | Transcribe hearings, settlement conferences, phone calls, and depositions locally on your own computer. Automatically identify who is speaking by **name, title, or both** (`THE COURT`, `THE CLERK`, `MR. MILLER`, `MS. BORGES`), clip any unsure voice to verify who spoke, cite exact `Page:Line` references, and keep every raw ASR pass untouched for auditability. |
| **Government Agencies & Municipal Courts** | Process public meetings, administrative hearings, and municipal calendars **100% offline/on-premise** with transparent SHA-256 source hashing, non-destructive correction histories, and automatic caption extraction from audio or minute orders. |
| **Law Enforcement & Investigators** | Transcribe body-worn camera audio, witness interviews, 911/phone recordings, and multi-speaker interrogations locally without uploading sensitive CJIS/investigative audio to third-party APIs. Extract short MP3/WAV clips of unidentified voices (`extract_audio_clip`) and fix recurring name spellings across an entire recording in one step (`replace_transcript_terms`). |

---

## Easy 2-Minute Install (No Coding Experience Required)

Pick the AI assistant you already use—once connected, you just drop in a recording and talk to it in plain English.

- **Antigravity (Easiest)**: Open Antigravity and paste this single sentence:
  > *"Install Roshi's Transcription MCP from https://github.com/RIAEvangelist/roshi-transcription-mcp as an Antigravity plugin and check my GPU."*
  *(Or run `.\setup.ps1 -InstallPlugin` on Windows / `./setup.sh --install-plugin` on macOS & Linux.)*
- **OpenAI Codex (App or CLI)**:
  ```bash
  codex mcp add roshi-transcription-mcp -- uvx roshi-transcription-mcp
  ```
- **Claude Code**:
  ```bash
  claude mcp add roshi-transcription-mcp -- uvx roshi-transcription-mcp
  ```
- **Claude Desktop / Cursor / Any MCP Client**:
  ```json
  {
    "mcpServers": {
      "roshi-transcription-mcp": {
        "command": "uvx",
        "args": ["roshi-transcription-mcp"]
      }
    }
  }
  ```

### What Using It Actually Looks Like (Plain English in Antigravity or Codex)

You never need to type terminal flags. Just chat naturally:

> **You (in Antigravity or Codex):** *"Transcribe `C:\Hearings\feb19_hearing.mp4` into a 28-line court-reporter PDF and an editable Word doc. Use the best model installed on my PC and figure out who each speaker is."*
>
> **You:** *"Cut me a short audio clip of every unidentified speaker, and play me the part where they talk about 'four tickets'."*
>
> **You:** *"Speaker 3 is Mrs. Tobin. Merge Speaker 4 into Mr. Tobin, change 'Ms. McBerry' to 'Ms. Mayberry' everywhere, and rebuild the PDF and Word doc."*
>
> **You (CSR finalization):** *"I've finished reviewing every line. Remove the 'AUTOMATED TRANSCRIPT' badge, hide the GPU specs and model details, and put 'Jane Doe, CSR No. 12345' on the Prepared By line."*

See step-by-step Antigravity & Codex examples on the **[Courtroom Workflows Page](https://riaevangelist.github.io/roshi-transcription-mcp/workflows.html)**.

---

## Real Courtroom Benchmark (6m 48s Real Municipal Court Hearing)

To benchmark speed, accuracy, and court-reporter formatting honestly, we ran **all 5 locally installed model settings one at a time** against the exact same **6 minute 48 second (408.4s)** real courtroom hearing on YouTube (**external link only — no third-party audio is hosted in this repository**):

- **Real Courtroom Source Video**: [Caught In Providence — *"Obey Your Mother"* (Municipal Court of Providence, Chief Judge Frank Caprio — 06:48)](https://www.youtube.com/watch?v=kDRupe9czr0)
- **Test Hardware**: NVIDIA GeForce RTX 5090 Laptop GPU (23.9 GiB VRAM) · Intel Core Ultra 9 275HX · Windows 11 · `NeMo-Speech.cpp 0.2.0`
- **Standalone Diarization (shared across all 5 runs)**: `NVIDIA Nemotron-3-Diarization (Q8_0, CUDA)` completed in **4.08 seconds** (**100.1x realtime**, 144 speaker segments), automatically identifying **`THE COURT`** and **`MR. TOBIN`** directly from the audio without a pre-supplied litigant name.

### Model-by-Model Results (One Setting at a Time — 06:48 / 408.4s Audio)

| Model & Precision Setting | Params | Audio Duration | ASR Time | Total End-to-End *(incl. Diarization + PDF/MD/TXT)* | Speed | Words | % Diff vs. Best Model (`large-v3 FP32`) | Similarity | Court PDF | Full Outputs |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---|
| **OpenAI Whisper `large-v3` (FP32 · CUDA)** *(Reference Ceiling)* | 1.55B | 06:48 (408.4s) | **60.90 s** | **65.07 s** | 6.7x RT | 977 | **0.00%** *(baseline)* | **100.00%** | 16 pp | [PDF](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_COURT.pdf) · [MD](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_COURT.md) · [TXT](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_COURT.txt) |
| **OpenAI Whisper `large-v3` (FP16 · CUDA)** | 1.55B | 06:48 (408.4s) | **72.14 s** | **76.26 s** | 5.7x RT | 976 | **0.20%** *(~2 words)* | **99.80%** | 15 pp | [PDF](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_COURT.pdf) · [MD](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_COURT.md) · [TXT](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_COURT.txt) |
| **OpenAI Whisper `large-v3-turbo` (FP16 · CUDA)** | 0.81B | 06:48 (408.4s) | **28.45 s** | **32.57 s** | 14.4x RT | 991 | **6.35%** | **93.65%** | 16 pp | [PDF](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_COURT.pdf) · [MD](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_COURT.md) · [TXT](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_COURT.txt) |
| **NVIDIA Parakeet TDT v3 (Q8_0 · CUDA)** | 0.6B | 06:48 (408.4s) | **3.31 s** | **7.43 s** | **123.3x RT** | 982 | **13.41%** | **86.59%** | 15 pp | [PDF](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_COURT.pdf) · [MD](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_COURT.md) · [TXT](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_COURT.txt) |
| **NVIDIA Nemotron-3.5 ASR (Q8_0 · CUDA)** | 0.6B | 06:48 (408.4s) | **7.72 s** | **11.84 s** | **52.9x RT** | 931 | **20.16%** | **79.84%** | 16 pp | [PDF](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_COURT.pdf) · [MD](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_COURT.md) · [TXT](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_COURT.txt) |

> **Key takeaway**: On RTX 5090 (Blackwell + PyTorch CUDA 13), full **Whisper `large-v3` FP32** was actually *faster* than FP16 (60.9s vs. 72.1s due to zero fp16↔fp32 casts during word-timestamp alignment) and 99.80% identical. **Parakeet TDT v3** finished the entire 6m 48s hearing in **3.31 seconds (123x realtime)**, making **`Whisper large-v3` primary + `Parakeet TDT v3` 3-second cross-check + `Nemotron-3-Diarization` (4s)** an unbeatable ~68-second accuracy-plus-verification pipeline!

### Sample Court-Reporter Pages (Click Any Page Thumbnail to View Full Size)

| Model | Page 1 (Cover & Appearances) | Page 3 (Opening Proceedings) | Page 4 (Colloquy Continuation) |
|---|---|---|---|
| **Whisper `large-v3` FP32** | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_1_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_1.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_3_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_3.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_4_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp32/whisper_large_v3_fp32_page_4.png) |
| **Whisper `large-v3` FP16** | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_1_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_1.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_3_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_3.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_4_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_fp16/whisper_large_v3_fp16_page_4.png) |
| **Whisper `large-v3-turbo` FP16** | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_1_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_1.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_3_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_3.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_4_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/whisper_large_v3_turbo_fp16/whisper_large_v3_turbo_fp16_page_4.png) |
| **Parakeet TDT v3 Q8_0** | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_1_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_1.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_3_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_3.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_4_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/parakeet_tdt_v3_q8/parakeet_tdt_v3_q8_page_4.png) |
| **Nemotron-3.5 ASR Q8_0** | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_1_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_1.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_3_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_3.png) | [<img src="https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_4_thumb.png" width="140">](https://raw.githubusercontent.com/RIAEvangelist/roshi-transcription-mcp/main/site/benchmarks/nemotron_3_5_asr_q8/nemotron_3_5_asr_q8_page_4.png) |

See the interactive embedded video + click-to-zoom lightbox gallery on the **[Benchmarks Page](https://riaevangelist.github.io/roshi-transcription-mcp/benchmarks.html)**.

---

## Core Courtroom & Review Capabilities

- **Automatic Speaker Identification (Name, Title, or Both)**: Infers speaker identities from self-introductions (`"My name is..."`, `"This is ... calling"`), direct-address → reply pairing (`"Mr. Tobin, ..."` / `"Ms. Borges, any objection?"`), courtroom role cues (`THE COURT`, `THE CLERK`, `THE REPORTER`, `COUNSEL`), and optional rosters or minute orders. Supports 4 inline label styles: `court_standard`, `title_and_name`, `name_only`, and `title_only`.
- **Mixed-Cluster Guardrail**: Automatically flags when one diarization cluster mixes contradictory roles (e.g., judicial speech + `"Your Honor"` replies) instead of silently misattributing turns.
- **Clip Unsure Speakers & Listen to Any Section**:
  - `extract_audio_clip` cuts playable `.mp3`/`.wav` samples for every low-confidence, unidentified, or mixed speaker so you can listen in seconds.
  - `listen_to_section` cuts and opens any timestamp (`"01:10"`–`"01:35"`), turn range (`T0005`–`T0008`), or spoken phrase in your audio player alongside the text and secondary model alternatives.
- **Non-Destructive Word & Speaker Corrections**:
  - `replace_transcript_terms` fixes recurring misspellings or misheard names globally with dry-run preview.
  - `apply_corrections` edits individual turns while preserving untouched `raw_text` and timestamped `correction_history`.
  - `update_speakers` renames speakers, merges split diarization clusters (`D4 -> D1`), and overrides specific turns or time ranges—automatically re-rendering your PDF/DOCX/MD/TXT.
- **CSR-Ready Toggleable Court Formatting**:
  - 28 lines/page (court proceedings) or 25 lines/page (audio/depositions), 12pt Courier monospace inside a bordered frame with left-gutter line numbers, shared `Page:Line` 2-column alphabetical **Word Index**, and **independently toggleable** cover badge (`show_status_badge`, custom `status_banner`), `prepared_by`, `include_provenance_page`, `include_system_specs`, and `include_model_details`.

---

## Quick Setup (Zero-Friction + Structured Model Alerts)

**Windows (Antigravity Plugin + NeMo-Speech.cpp + Models):**
```powershell
.\setup.ps1 -InstallPlugin
```

**macOS / Linux:**
```bash
./setup.sh --install-plugin
```

**Any MCP Client (`uvx`):**
```json
{
  "mcpServers": {
    "roshi-transcription-mcp": {
      "command": "uvx",
      "args": ["roshi-transcription-mcp"]
    }
  }
}
```

If dependencies are missing on a fresh machine:
- `bootstrap_mcp.py` automatically creates an isolated venv with `mcp`, `reportlab`, `python-docx`, and bundled **`imageio-ffmpeg`** (so audio conversion works even without system FFmpeg or admin rights).
- Missing NeMoSpeech models auto-pull on demand (`auto_pull_models=True`).
- If `nemo-speech` or a model is missing or offline, every tool returns a structured `status: "missing_dependencies"` alert with **hardware-tailored model/precision recommendations**, an exact `setup_dependencies(...)` tool call, and manual install commands.

---

## Under the Hood (The Nerd Speak)

### Hardware-Aware Model & Precision Selection
`select_best_installed_models()` and `recommend_precision()` inspect your GPU, VRAM, BF16 capability, CPU, and OS:
- **Largest-installed primary ASR default**: `whisper-large-v3` (1.55B CUDA) → `parakeet-ctc` (1.1B) → `parakeet-tdt` (0.6B v3) → `nemotron-3.5` (0.6B) → `nemotron-en` (0.6B).
- **Hardware-aware precision**: Recommends `bf16` ASR + `f32` diarization + `fp16`/`fp32` Whisper on ≥16 GiB modern NVIDIA GPUs; `f16` on Apple Silicon; compact `q8_0` on <8 GiB VRAM or CPU-only systems.
- **Full user/agent override** at install time (`setup_dependencies(pull_models=[...])`) or run time (`transcribe_and_diarize(primary_asr=..., diar_model=..., precision="auto|f32|bf16|f16|q8_0|q6_k|q4_k")`).

### Multi-Pass Audio Pipeline
- **`fast`**: Standalone `Nemotron-3-Diarization` + single GPU ASR pass.
- **`dual`** *(default)*: `dynaudnorm` loudness normalization + standalone `Nemotron-3-Diarization` + largest installed primary ASR + secondary model cross-check with automatic disagreement flagging.
- **`court`**: Full FTR-style multi-pass — `dynaudnorm` mix + stereo LEFT/RIGHT channel isolation across Whisper `large-v3` (with roster `initial_prompt`), Parakeet TDT v3, and Nemotron-3.5, keeping every raw JSON untouched under `~/RoshiTranscripts/<job>/raw/`.
- Strict namespace separation between standalone diarization IDs (`D1`, `D2`, ...) and integrated ASR speaker fields, exact word-level temporal overlap alignment, single-word flicker smoothing, and automatic decoder-loop suppression.

### All 15 MCP Tools

| Tool | Purpose |
|---|---|
| `diarization_doctor` | Inspect GPU/VRAM/CPU/OS, `nemo-speech`, FFmpeg, models, hardware precision recommendations & readiness |
| `setup_dependencies` | Auto-install NVIDIA NeMo-Speech.cpp, FFmpeg fallback, and pinned models |
| `pull_model` | Pull any indexed NeMoSpeech model (`parakeet-ctc`, `parakeet-tdt`, `nemotron-3.5`, `nemotron-3-diarization`, `sortformer`) |
| `diarize_audio` | Standalone Nemotron-3-Diarization returning timestamped `D1`/`D2` speaker intervals |
| `transcribe_and_diarize` | End-to-end diarization + multi-pass ASR + speaker name/title ID + auto-caption extraction + court rendering |
| `list_jobs` / `get_job` | Browse and inspect saved jobs under `~/RoshiTranscripts/` |
| `identify_job_speakers` | Re-run speaker name/title inference with updated roster/minute-order hints |
| `extract_audio_clip` | Cut playable MP3/WAV clips for unsure speakers, clusters, turns, or custom ranges |
| `listen_to_section` | Cut and immediately play any section by timestamp, turn range, or spoken phrase |
| `update_speakers` | Rename speakers, merge split clusters (`D4 -> D1`), or override turns/time ranges with auto re-render |
| `apply_corrections` | Non-destructive turn-level wording/speaker edits with full `correction_history` |
| `replace_transcript_terms` | Global find/replace for recurring misspellings/names with `dry_run` preview & auto re-render |
| `search_transcript` | Search turns by keyword, regex, speaker, time window, or model disagreement (`uncertain_only=True`) |
| `render_court_transcript` | Render/re-render court PDF, DOCX, line-numbered MD/TXT, timestamped MD, SRT, and VTT with full toggles |

---

## License

MIT License — see [LICENSE](LICENSE). Built by **RIAEvangelist (Roshi)**.
