← Work

kotoma

Tool Rust · whisper.cpp · ratatui View source

A local-first TUI that transcribes your microphone and system audio in real time, showing English and Japanese side by side.

I built kotoma as a personal project: a TUI that transcribes your microphone (and, optionally, system audio) in real time, displaying English and Japanese side by side. Everything runs locally.

Why I built it

English is the working language in my lab, and I often lost the thread of meetings and discussions as they happened. I wanted to see what was said in real time, with a translation alongside, so that nothing important got missed.

Cloud transcription services are convenient, but there are times you don’t want meeting audio leaving your machine. I wanted something that runs entirely locally and starts from the terminal.

What it does

  • Transcribes microphone input (and optionally system audio) in real time
  • Shows English and Japanese side by side. A marks the language actually spoken, and the opposite column shows the translation
  • Saves sessions as timestamped Markdown tables
┌ kotoma · REC · lang=en · model=ggml-small.bin · tr=ready ┐
├─ English ───────────────────┬─ 日本語 ──────────────────────┤
│ [10:31:03] ▶ Hello, how are │ [10:31:03]   こんにちは、お元気 │
│ you?                        │ ですか?                       │
│ [10:31:10]   I'm fine.      │ [10:31:10] ▶ 元気です。        │
└─────────────────────────────┴────────────────────────────────┘

How it’s built

Written entirely in Rust.

  • Speech recognition: capture with cpal → voice-activity detection with webrtc-vadwhisper.cpp (Metal) via whisper-rs
  • Translation (optional): runs Qwen2.5 as a llama-server subprocess and queries it over HTTP
  • UI: two-column layout with ratatui
  • Output: timestamped Markdown tables

On Apple Silicon it uses Metal, so even a 16 GB M-series Mac runs the standard tier comfortably. Drop the [translator] section for a lighter transcription-only build.

Try it

No clone needed, install with one line:

curl -fsSL https://raw.githubusercontent.com/shohei81/kotoma/main/install.sh | bash -s -- standard

The installer handles the build, model download, and config setup. Then pass an output path and start:

kotoma notes.md

Source is at github.com/shohei81/kotoma (MIT licensed). Keybindings, system-audio mixing, and model tiers are documented in the README.