Skip to content

About

Local-first macOS transcription for mixed-language (macaronic) speech — decode-time glossary injection, whole-file speaker diarization, audio never leaves the device.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Maccheroni — a waveform interleaved with macaroni, two speaker lines woven through

Maccheroni

Local-first transcription for mixed-language speech on Apple Silicon.
Glossary injection at decode time · whole-file speaker diarization · audio never leaves your Mac.

platform swift license

Research journal

English · Deutsch · Español · Français · Italiano · 日本語 · 한국어 · Português · Русский · 简体中文


Maccheroni (from macaronic speech — utterances that mix languages) transcribes the conversations that are hardest to get right: Korean meetings with English product names in every sentence, language classes, multilingual calls. Transcription and diarization run on-device with pinned MLX/Core ML models; optional text-only post-processing can use Codex.

What an export looks like (illustrative sample, not model output):

**Speaker 1** [00:04] Did the smoke tests pass on staging before we merged that PR?
**Speaker 2** [00:09] Yes, and the Kubernetes rollout was clean. [UNCERTAIN] There's
                      still a latency spike on the [CONFLICT: Grafana|Graphana]
                      dashboard, though.
**Speaker 1** [00:17] Alright, then the release window stays as planned.

Uncertain corrections are flagged, never silently substituted. Speaker labels come from one whole-file diarization pass, so they stay consistent across a two-hour recording.

Maccheroni transcript view: two speakers with global labels and per-segment evidence chips, next to a run inspector listing run status, pinned model revisions, and the glossary record

Every run keeps its evidence: the inspector shows the exact pinned models, the run status, and whether the glossary reached the decoder. The displayed layer — raw, corrected, or translated — copies to the clipboard with a provenance header.

Why this exists

Maccheroni is a personal tool: a configurable workbench for turning mixed-language conversations into speaker-attributed records on one Mac, tuned by its operator rather than for a market.

  • Profiles compose the setup per conversation. Each profile pairs a pinned on-device ASR model with glossary context and whole-file speaker handling that fit how that conversation actually sounds — a Korean meeting dense with English product names needs different choices than an Italian two-speaker dialogue.
  • Pairings are measured, not assumed. Public and synthetic fixtures, term recall, and error rates live in this repository, so changing a model or glossary is a comparison you can rerun, not a hunch.
  • Every run keeps its evidence. Pinned model revisions, the glossary-delivery record, raw transcripts, the speaker timeline, and typed failures are sealed into the run, so a result can be inspected and reproduced later.

The source-level notes that shaped these choices live in docs/reference-project-source-audit.md.

What makes it different

  1. Glossary at decode time. Names and technical terms enter the model's context before decoding, because an ASR error destroys the acoustic evidence the moment it happens. Post-processing can polish text; it cannot recover what the decoder never wrote. Every leaf's glossary payload is hash-sealed into the run manifest.
  2. One diarization pass owns the speakers. The whole file is diarized once; that timeline is the only speaker authority. ASR runs in bounded chunks and merges by timestamp — chunk-local speaker guesses can never flip a label across a boundary.
  3. No silent data loss, ever. Inputs beyond a backend's limit fail explicitly or produce a split plan. Truncated model output is a typed failure (invalid_eos_output), not a shorter transcript. Originals and raw transcripts are immutable; corrections and translations are separate create-only artifacts.

How it works

Pipeline diagram: on your Mac, capture feeds whole-file diarization and 120-second ASR leaves with per-leaf glossary injection; the timestamp merge, where the timeline owns speakers, feeds optional on-device post-processing; the only thing that leaves the Mac is the opt-in remote post-processing lane, an external vendor reached through your Codex sign-in, text only

Failed leaves are re-split within typed bounds (30 s minimum, depth 3) and only end-of-sequence outputs are ever promoted to the canonical transcript. The optional Codex lane sends bounded transcript text, the active glossary, and instructions — never audio, never file paths — through your own ChatGPT/Codex subscription. Correction treats the glossary as supporting context: a term is substituted only where the segment plausibly contains it, and any uncertain repair is flagged for review instead of applied.

Models

Product model and service identities are recorded in every run manifest. Downloadable models are pinned by Hugging Face ID, revision, and quantization.

Role Model Revision Quantization
ASR (Italian / mixed) aufklarer/MOSS-Transcribe-Diarize-0.9B-MLX-INT8 90aa6528 int8-decoder + fp16-audio-vq-kv
ASR (Korean) mlx-community/VibeVoice-ASR-8bit 725c72e5 int8
VAD aufklarer/Silero-VAD-v6.2.1-CoreML 52387654 coreml-float16
Diarization aufklarer/Pyannote-Community-1-CoreML a14e6c42 coreml-fp32
Post-processing (local) mlx-community/gemma-4-12B-it-qat-4bit e70c6b3b qat-int4 (mlx-vlm 0.6.6)
Post-processing (remote, text-only) gpt-5.6-sol via Codex app server service-managed n/a

Qwen3-ASR, Qwen3 ForcedAligner, and DiCoW remain research candidates. Apple-runtime compatibility, conversion parity, and product-quality gains have not been established for them.

Measured results

All from public or synthetic fixtures; evaluation IDs and artifact hashes are recorded in docs/.

Bar charts: CER and WER per fixture (Korean dialogue 0.081/0.141, Italian two-speaker 0.033/0.085), glossary term recall (0.95 and 0.778 against the 0.75 gate), and diarization error rate (0.048 synthetic, 0.152 VoxConverse)
Fixture Model CER WER Term recall Omissions DER
Korean dialogue, 20-term glossary VibeVoice 0.081 0.141 0.95 0 —
Italian 2-speaker synthetic (10 min), 9-term glossary MOSS 0.033 0.085 0.78 0 0.048
VoxConverse sample (78 min) VibeVoice + Pyannote — — — — 0.152

Korean and Italian are the first two language profiles. HiKE, FLEURS, and AMI are research fixtures for transport, scoring, and conversion-parity work. They cannot promote a model until training-data exclusion and overlap-specific measurements are established.

Chunk-boundary speaker stability on the 78-minute sample: 1.0 for both reference speakers. A fixed 600-second matrix showed that MOSS leaves above 120 s lose timestamp structure entirely, which is why the production leaf cap is 120 s — details in docs/moss-long-audio-verdict.md.

Bar chart: on the same 600-second input, 120-second leaves yield 5 canonical end-of-sequence leaves (pass), 240- and 300-second leaves yield 0 valid leaves (typed invalid_eos_output failures), and forced recovery from 240-second parents yields 5 valid 120-second children

Correction gains are measured with a four-state comparison of raw and corrected output, with and without decode-time glossary injection. Harmful edits are counted explicitly. maccheroni postprocess and the app can derive new correction or translation sets from sealed segments without rerunning ASR; saved glossary revisions remain content-addressed and reusable.

Install

There are no packaged releases yet — build from source.

Requirements: Apple Silicon Mac, macOS 26, Xcode 26, uv.

git clone https://github.com/gigio1023/maccheroni.git
cd maccheroni
swift build && swift test
zsh scripts/build-app.zsh          # builds and codesigns Maccheroni.app

The default Swift suite uses bundled and generated fixtures. It is portable across clean Apple Silicon checkouts and does not read an owner model cache or run model inference.

Provision the exact external runtime for the Korean meeting profile with:

cache_root="$HOME/Library/Caches/Maccheroni/benchmarks"
MACCHERONI_BENCHMARK_CACHE="$cache_root" \
  zsh scripts/setup-transcription-runtime.zsh --profile ko-meeting

The setup command installs the pinned VibeVoice, Silero, and Community-1 closure plus its Python environment under the Maccheroni benchmark cache. Model weights and Python environments remain outside the repository and app bundle. The indirect Qwen/Qwen2.5-7B dependency contains tokenizer files only. This profile does not provision MOSS or Qwen ASR/aligner inference weights.

After provisioning, opt into real VibeVoice, Silero, and Community-1 integration tests explicitly:

MACCHERONI_RUN_MODEL_INTEGRATION=1 MACCHERONI_BENCHMARK_CACHE="$cache_root" MACCHERONI_HF_HOME="$cache_root/models/huggingface" swift test --filter MaccheroniModelIntegrationTests

The opt-in suite fails with a prerequisite error when the exact runtime is missing or incomplete. Change cache_root to use a non-default external cache.

The app prints its bundle path when the build, resource-allowlist inventory, and strict codesign checks all pass. Profile definitions for ko-meeting and it-dialogue are included, and maccheroni doctor reports their observed dependencies and storage state.

The executable provides these product commands:

.build/debug/maccheroni help [help|run|postprocess|doctor|capabilities]
.build/debug/maccheroni run recording.wav --profile it-dialogue
.build/debug/maccheroni postprocess Runs/meeting --profile ko-meeting
.build/debug/maccheroni doctor [--profile NAME] [--profiles PATH] [--json]
.build/debug/maccheroni capabilities [--json]

Use maccheroni help, maccheroni doctor --json, and maccheroni capabilities --json for discoverable help and structured output. See the concise CLI guide for command and output contracts. Transcription and diarization run on this Mac, so audio remains local.

For the optional local post-processing model, run zsh scripts/setup-postprocess-runtime.zsh.

Privacy

Maccheroni capture view: profile picker with measured metrics, post-processing choice between Codex, Local, and None, and the notice that audio never leaves this Mac

  • Transcription, VAD, and diarization are fully local. Audio bytes never reach any network path — this is enforced by tests, not policy.
  • The optional Codex post-processing lane is text-only and opt-in per run. It opens a one-turn codex app-server session using the cached ChatGPT subscription sign-in. The thread is ephemeral and read-only, MCP servers and optional tooling are disabled, and approval requests are declined; the prompt contains segment text, the active glossary, and instructions. API-key authentication is not accepted for this lane. Choosing the local MLX model instead keeps even text on-device.
  • Codex-lane failure messages are length-capped and path-redacted before they enter run manifests.

Limitations

  • Apple Silicon + macOS 26 only. No Intel, no iOS, no Windows/Linux.
  • Post-transcription only — no live captions (deliberately, quality first).
  • Mixed-language quality is verified on fixtures, not yet on months of real meetings.
  • The Codex lane requires your own Codex CLI login and subscription quota.
  • UI is English by default with 10 localizations; ko/it strings are still marked for human review.

Contributing

Issues and focused pull requests are welcome. Build and test commands, the verification standard behind this README's claims, commit rules, and issue/PR conventions live in CONTRIBUTING.md.

Repository map

Path What it is
Sources/ Swift package: Core, Preprocess, ASR, Diarize, Merge, Postprocess, CLI, App
Tests/ Fixture-based Swift tests
benchmarks/scripts/ Runners, scorers, and the correction-path comparison harness, with derived verdicts and negative tests
docs/ Research digest, source audits, constraint policy, contracts (JSON schemas), UI design
scripts/ App bundle build, transcription and post-processing runtime setup, benchmark harness builds
PROJECT.md Intent hierarchy: pillars, non-goals, judgment rules, append-only decision log
AGENTS.md Operating conventions for working in this repo

Every completion claim in the docs carries the command that produced it and its observed output.

License & acknowledgements

MIT. Standing on: speech-swift (MLX/CoreML speech runtimes), the MOSS, VibeVoice, Silero, and pyannote model authors, and mlx. The reference-project source audit in docs/ credits the open-source projects whose designs — good and bad — shaped this one.

About

Local-first macOS transcription for mixed-language (macaronic) speech — decode-time glossary injection, whole-file speaker diarization, audio never leaves the device.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages