# OpenLRC pairs Whisper transcription with LLM translation, and hides its GUI

> zh-plus/openlrc is an MIT Python library that transcribes audio with faster-whisper, then translates and polishes the result into .lrc subtitles with OpenAI, Anthropic or Google models. It loads its heavy dependencies lazily, keeps noise suppression behind an extra, and documents a GUI section that is entirely commented out.

**zh-plus/openlrc** — Transcribe and translate voice into LRC file using Whisper and LLMs (GPT, Claude, et al).

- Repository: https://github.com/zh-plus/openlrc
- Website: https://zh-plus.github.io/openlrc/
- Stars: 681 · Forks: 53
- Language: Python
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/zh-plus-openlrc

## The GUI section is present and entirely commented out

The usage chapter opens with a block that has been neutralised rather than deleted. Every line is prefixed with Markdown's comment syntax for reference-style hiding, including the section heading, the note, the shell fence and the command that would launch it. What survives inside the comments is the reason: the GUI is being migrated from Streamlit to Gradio and is still under development, and the disabled command is openlrc gui. That leaves the library with no documented graphical surface, which matters because a transcription tool with a wizard is the obvious entry point for a non-programmer. The documentation site is linked separately for full details, and the Python API is presented as the supported path, with an example that creates an LRCer, runs it against a file or a list of files, and names a target language to produce a translated .lrc next to the source.

## Heavy imports are deferred, and the import list is the proof

Import cost is treated as an API design problem here, and the documentation makes a specific promise: importing the package root does not eagerly load heavyweight runtime dependencies. The named offenders are dpdfnet, spacy, faster-whisper, tiktoken and lingua, and the guaranteed-safe imports are the package itself, the LRCer class, the two configuration objects TranscriptionConfig and TranslationConfig, and the model metadata surface with ModelConfig, ModelProvider and list_chatbot_models. That is a meaningful guarantee rather than a stylistic one, because a user who only wants to enumerate models or build a config object should not pay for a speech stack to do it. Each heavy dependency then loads at the moment its feature is first used: faster-whisper on the first transcription, dpdfnet on noise suppression, spacy for sentence segmentation, tiktoken for token counting and lingua for language detection.

## Noise suppression is an extra that fetches a 10MB model

The optional surface is small and explicit. The base install does not include dpdfnet at all; it arrives only with the full extra, and it is needed only when you pass noise_suppress=True to a run or to the preprocessor. On first use DPDFNet downloads its default model, named with a 48 kHz high-resolution variant and about ten megabytes in size, into a cache directory under the user home. A second extra exists for routing translation through LiteLLM, for anyone who wants a single client across providers. The packaging comments explain the intent: DPDFNet is pure Python on top of the ONNX runtime with no torch or torchaudio dependency, which is why it is not in the base set and why the extra adds a JIT compiler package alongside it. The base install itself is two lines, from PyPI or straight from the GitHub repository:

```shell
pip install openlrc
```

## CUDA, cuDNN, cuBLAS and ffmpeg are prerequisites

The installation list is longer than a pip command. Step one is installing CUDA and cuDNN following the CTranslate2 guidance that faster-whisper builds on, and the documentation adds that faster-whisper also needs cuBLAS. Windows users get an escape hatch: a third-party repository packages the required NVIDIA libraries into a single archive, and the instruction is to decompress it and place the libraries in a directory already on the PATH. Step two is credentials, with environment variables for OpenAI, Anthropic, Google and OpenRouter, and the recommendation that most users set the OpenRouter key because it routes to several vendors through one variable. Step three is ffmpeg, with its bin directory added to the PATH. None of this is optional for the transcription path, so the practical order is driver and toolkit first, ffmpeg second, keys third, and the package last. The audio preprocessing that reduces hallucinations, loudness normalisation with optional noise suppression, sits on top of that stack.

## Transcription runs sequentially while translation runs concurrently

The API is small, and the concurrency detail is stated in the example rather than left implicit. A run against one file takes the source path and a target language, and writes a translated .lrc beside it using the default translation prompt. Passing a list of files does the same for each. The comment on that call records the shape of the work: transcription is sequential, while translation for each file runs concurrently, which matters because transcription is GPU-bound and translation is network-bound, so overlapping them is the difference between waiting on the model twice and waiting on it once. Paths may point at video as well as audio. There is also a lifecycle detail that saves resources on batch jobs, since LRCer implements the context manager protocol and closes the underlying LLM connections when the block exits, and because the connection pool is shared across every file handled by one instance, the documentation recommends that pattern for multi-file work rather than constructing a new object per file.

## Glossaries are JSON files so the config stays serializable

Domain vocabulary is handled by a glossary rather than by prompt engineering at call time. The example given is a game-specific file, a small JSON object mapping English terms to their Chinese equivalents, including proper nouns and an in-game abbreviation alongside ordinary words like scout. It is passed through the translation configuration rather than handed to the run call, so the same file serves every run in a session. The reason for the file-based design is stated explicitly: keeping the configuration serialization-friendly means in-memory glossary data has to be written to a JSON file and referenced by path. That is a constraint imposed by something outside the library, a cached or resumable configuration, and it means a glossary assembled at runtime cannot be passed as a dictionary. For anyone batching domain translation, the practical consequence is that glossary maintenance becomes a file in version control, which is arguably the better outcome anyway.

## The cost table is derived, and two of its rows are preview models

There is a pricing section, and it is worth reading as arithmetic rather than as vendor data. It has three columns: model name, the price per million tokens for input and output in US dollars, and the cost for one hour of audio. The sourcing note credits the OpenAI and Anthropic pricing pages for the token rates, which means the third column is the project's own derivation from those rates plus an assumption about how many tokens an hour of transcribed speech produces. Among the visible rows, gpt-3.5-turbo and gpt-4o-mini are both listed at 0.5 input and 1.5 output with a stated 0.01 per hour of audio, while two rows with preview names in their identifiers are listed at 10 and 30 with 0.5 per hour. That is a fifty-fold spread driven by model choice, and it is the practical reason the lean translation mode exists.

## Three vendor SDKs are hard dependencies, and so is pip

The manifest is more opinionated than the install page suggests. Python is bounded on both sides, requiring 3.11 or newer and excluding anything from 3.15 upward, which is the kind of upper bound that ages into a support question. Three model SDKs are required rather than optional: the OpenAI client at 2.20 or newer, the Anthropic client at 0.90 or newer, and the Google generative AI client. LiteLLM, which would let you point at one of those through a single interface, is an extra instead, which is a slightly odd arrangement given that the SDKs it wraps are already installed. Two other details deserve a mention. spaCy is pinned below a specific patch release with an inline comment explaining that the excluded version has no wheels for a newer Python on PyPI, which is the kind of note that saves an afternoon. And pip itself appears in the runtime dependency list with a floor of 25.1, which is unusual for a library and means your installer version becomes part of the compatibility surface.

## Conclusion

OpenLRC is a reasonable choice when you want timed, translated lyrics rather than a plain transcript, and when your machine already has the CUDA stack that faster-whisper demands. Two things decide it for most people. Installing means a GPU toolchain plus ffmpeg plus at least one LLM key, so budget an evening before your first run rather than an afternoon. And the per-hour costs in the documentation are the author's derivation from token prices that include preview models, so re-check them against current rates before you transcribe a long archive. Use the Python API rather than expecting a GUI, because the interface section in the documentation is disabled.

## FAQ

### Is Whisper AI open source?

OpenLRC does not bundle Whisper itself, it calls faster-whisper, the CTranslate2-based implementation published at guillaumeklyn/faster-whisper on GitHub, and the installation steps are the ones CTranslate2 documents for CUDA, cuDNN and cuBLAS. OpenLRC itself is MIT licensed and installs from PyPI or directly from its GitHub repository.

### Is there an open source tool to transcribe audio to text?

OpenLRC is one: an MIT licensed Python library on PyPI that installs with pip install openlrc, transcribes with faster-whisper and produces .lrc subtitle files. It expects a CUDA-capable setup with cuDNN, cuBLAS and ffmpeg on the PATH, plus an LLM API key if you want the translation and polishing step.

### How do I use a glossary for domain translation in OpenLRC?

Write the glossary as a JSON object mapping terms to their translations, for example aoe4-glossary.json, and pass the file path through TranslationConfig(glossary=...) when you create the LRCer. The documentation asks for a file rather than a dictionary specifically so the configuration stays serialization-friendly, which also makes the glossary reviewable in version control.

### What does installing OpenLRC pull into my environment?

The base install requires the OpenAI, Anthropic and Google generative AI SDKs, faster-whisper, spaCy, tiktoken, lingua, ffmpeg-python, ffmpeg-normalize, audioread, langcodes, zhconv, jaconvV2, json_repair, tqdm, colorlog, filetype, language-data and pysbd, along with pip 25.1 or newer. Noise suppression needs the full extra for DPDFNet, and LiteLLM routing needs the litellm extra.

## Sources

- [License: MIT](https://github.com/zh-plus/openlrc/blob/master/LICENSE)
- [Project website](https://zh-plus.github.io/openlrc/)
- [README](https://github.com/zh-plus/openlrc/blob/master/README.md)
- [Releases](https://github.com/zh-plus/openlrc/releases)
- [zh-plus/openlrc on GitHub](https://github.com/zh-plus/openlrc)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/zh-plus-openlrc
