← 全部工具

lymar/trakktor

AI Agent
热度 70 更新于 开发与构建

A predictable CLI toolbox for coding agents — fully local ML: transcribe speech (Whisper, GigaAM, Vosk), read text aloud in a preset or cloned voice (Qwen3-TTS, ESpeech/F5-TTS), cut silence by voice activity, restore punctuation and casing, split transcripts into paragraphs; plus web feeds. JSON-first, stable flags, meaningful exit codes.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

trakktor

trakktor is a predictable, automation-friendly Rust CLI toolbox for coding agents such as Claude Code and OpenCode (humans are welcome to use it too): speech-to-text and text-to-speech, speech enhancement, voice-activity audio editing, text off page images, PDF to Markdown, PDF page cutting, feeds, text structuring, and more — machine-readable output, stable flags, and meaningful exit codes. No Python, no virtual environments, no drawn-out setup: a single binary that takes care of everything itself, downloading and caching the models it needs on first use.

Commands

Each command is documented in full on its own page under docs/features/:

  • asr — speech recognition: transcribe

(or translate) speech from an audio file, with three engines — whisper (many languages, autodetection, translation to English, plus the Podlodka fine-tunes for Russian), gigaam (GigaAM Conformer models, mainly Russian), and vosk (Vosk's Zipformer2 transducers, offline and streaming).

  • tts — speech synthesis: text in, an

audio file out — plain text or Markdown, any length, fully local. Three engines — qwen3-tts (ten languages, nine preset voices), espeech (Russian, the voice cloned from a recording you supply, stress marked automatically), and silero (sixty preset voices across twenty languages — Russian, Ukrainian, Belarusian, Kazakh, Tatar, Bashkir, Georgian, Armenian and a dozen more of the region, though no Latin-script language and so no English — at 48 kHz, and fast enough on a CPU to be the one to use without a GPU).

  • ocr — read text off images: scans,

photographs of pages and screenshots in, text out — page by page, so a document is read by passing its pages in order. Two engines. paddle is a port of PaddleOCR's classic pipeline (detection, then recognition) reading its published models directly, both live generations of them: fourteen recognizers covering Cyrillic, Latin, Arabic, Devanagari, Korean, Thai, Greek, Tamil, Telugu and Chinese/Japanese. It reads with the best models it has for the language, which is not one generation for all of them — the newest carries no Cyrillic at all, so a Russian page is found by the new detector and read by the older recognizer. About 139 MB for an English page and a few seconds; --quality fast trades that back for 13 MB and a quarter to a third off the time. vl is a port of the PaddleOCR-VL document model, which writes out what it sees instead of picking characters from a dictionary: it works out the writing system by itself, reads scripts the classic pipeline has no model for at all, and returns a table as markup or a formula as LaTeX — for about 2 GB of weights and tens of seconds a page. Output either way is JSON with every line's box and confidence, plain text, or Markdown with paragraphs and a reading order worked out from the geometry. A third model (layout, 130 MB, about a second and a half a page) labels the blocks of the page — title, heading, paragraph, footnote, running head, page number, table, formula, picture — so the structure is read rather than guessed; it runs by default, --no-layout skips it, and ocr layout runs it on its own and answers "what is on this page" without reading a word. A page photographed rather than scanned gets three more steps, off by default and available to both engines: --doc-orientation finds which right angle the page is at and turns it upright, --sheet cuts the sheet out of the frame, and --unwarp straightens it — the perspective of a shot taken at an angle and the curve of a page that will not lie flat. On a set of twelve photographs of one page, that takes a sideways or curled shot from unreadable to reading exactly as well as a 300 dpi scan of the same page. Boxes still come back on the photograph you passed in.

  • convert — a document to Markdown:

convert pdf reads the text a PDF already carries and writes it out as Markdown — headings, tables and reading order included. A document made from a layout program needs no recognizing at all: the text comes out letter for letter, in a fraction of a second for a hundred pages, with nothing downloaded and no model run. A PDF from a scanner belongs to ocr instead, and you do not have to know which one you have: every page is classified first, the ones with text are converted, and the ones without are named. It also repairs a defect that costs around 2.5 % of the words of a typeset paper — fonts that keep their encoding inside the font program, which is what turns first into rst and ≤ into 6 — and reports the two kinds of damage that cannot be repaired.

  • pdf — edit a PDF as a document:

pdf cut cuts a page range out of a PDF and writes it as a new, self-contained PDF — the chapter out of a book, the paper out of a proceedings volume. Everything the kept pages use comes along byte for byte: fonts, images, shared resources. A document-level structure that cannot survive the cut whole — bookmarks into removed pages, user-facing page numbering, a form whose fields lived there — is dropped and named in the output rather than left half-working. An encrypted document opens with --password, and the result is written decrypted. Pure Rust, nothing downloaded, hundreds of pages in seconds.

  • enhance — clean up a speech recording:

a damaged recording in, a repaired one out — room noise and hiss removed, reverberation reduced, and, with the right engine, the holes a dropped packet leaves in a call filled in from the words on either side. Five engines. gtcrn is the one to reach for: a masking network of forty-eight thousand parameters, 580 KB of weights, about a sixtieth of real time on one CPU core. unipase is generative — five hundred and forty-six million parameters — and earns its keep on exactly one thing a mask cannot do, filling a hole. mpsenet sits between them and does the other thing a mask cannot: it estimates phase as its own output instead of carrying the input's over. And the resemble pair — a masking denoiser and a generative restorer — are the only two that work at 44.1 kHz rather than 16, so they are the ones for a recording that was never a phone call and whose band you want to keep; the second of them does not filter at all but synthesises speech from noise, which is why it can widen a band and why it can invent a word. Whichever you pick, this repairs damage and does not improve a recording that is already good: the page says where the two engines that have been measured — against two independent recognisers — help and where they hurt.

  • vad — voice-activity audio editing:

find the speech in an audio file and report it, cut the silence out, or split the recording into clips.