KrillinAI is a versatile audio and video localization and enhancement solution developed by the Krillin AI team, designed for both human users and AI Agents. The tool covers the complete pipeline including video download, speech transcription, subtitle translation, TTS dubbing, portrait conversion, and cover generation, supporting both landscape and portrait formats to ensure perfect presentation on all major platforms (Bilibili, Xiaohongshu, Douyin, WeChat Video, Kuaishou, YouTube, TikTok, etc.). Human users can complete end-to-end content localization with one click via the client; each capability can also be invoked independently via CLI, and AI Agents can orchestrate single or multiple stages on demand to flexibly compose automated workflows.
🤖 CLI Support: Provides a phased command-line interface where each stage executes independently and outputs structured results, supporting cross-stage artifact reuse.
🧩 Skills Collection: The skills/ directory provides per-stage Skills for AI Agents to invoke directly under a stable contract, no need to parse CLI documentation.
🔗 Pipeline Orchestration: Chain multiple stages in one command, enabling full automation from download to rendering.
🖼️ Cover Generation: Automatically generate platform cover images from the original video thumbnail and a prompt template.
📥 Video Acquisition: Supports yt-dlp downloads or local file uploads
📜 Accurate Recognition: High-accuracy speech recognition based on Whisper
🧠 Intelligent Segmentation: Subtitle segmentation and alignment using LLM
🔄 Terminology Replacement: One-click replacement of professional vocabulary
🌍 Professional Translation: LLM translation with context to maintain natural semantics
🎙️ Voice Cloning: Offers selected voice tones from CosyVoice or custom voice cloning
🎬 Video Composition: Automatically processes landscape and portrait videos and subtitle layout
💻 Cross-Platform: Supports Windows, Linux, macOS, providing desktop, server, and CLI modes
The image below shows the effect of the subtitle file generated after importing a 46-minute local video and executing it with one click, without any manual adjustments. There are no omissions or overlaps, the segmentation is natural, and the translation quality is very high.

subtitle_translation.mp4 |
tts.mp4 |
agi.mp4 |
All local models in the table below support automatic installation of executable files + model files; you just need to choose, and Klic will prepare everything for you.
| Service Source | Supported Platforms | Model Options | Local/Cloud | Remarks |
|---|---|---|---|---|
| OpenAI Whisper | All Platforms | - | Cloud | Fast speed and good effect |
| FasterWhisper | Windows/Linux | tiny/medium/large-v2 (recommended medium+) |
Local | Faster speed, no cloud service cost |
| WhisperKit | macOS (M-series only) | large-v2 |
Local | Native optimization for Apple chips |
| WhisperCpp | All Platforms | large-v2 |
Local | Supports all platforms |
| Alibaba Cloud ASR | All Platforms | - | Cloud | Avoids network issues in mainland China |
✅ Compatible with all cloud/local large language model services that comply with OpenAI API specifications, including but not limited to:
- OpenAI
- Gemini
- DeepSeek
- Tongyi Qianwen
- Locally deployed open-source models
- Other API services compatible with OpenAI format
- Alibaba Cloud Voice Service
- OpenAI TTS
Input languages supported: Chinese, English, Japanese, German, Turkish, Korean, Russian, Malay (continuously increasing)
Translation languages supported: English, Chinese, Russian, Spanish, French, and 101 other languages
You can ask questions on the Deepwiki of KrillinAI. It indexes the files in the repository, so you can find answers quickly.
First, download the executable file that matches your device system from the Release, then follow the tutorial below to choose between the desktop version or non-desktop version. Place the software download in an empty folder, as running it will generate some directories, and keeping it in an empty folder will make management easier.
【If it is the desktop version, i.e., the release file with "desktop," see here】 The desktop version is newly released to address the issues of new users struggling to edit configuration files correctly, and there are some bugs that are continuously being updated.
- Double-click the file to start using it (the desktop version also requires configuration within the software)
【If it is the non-desktop version, i.e., the release file without "desktop," see here】 The non-desktop version is the initial version, which has a more complex configuration but is stable in functionality and suitable for server deployment, as it provides a UI in a web format.
- Create a
configfolder within the folder, then create aconfig.tomlfile in theconfigfolder. Copy the contents of theconfig-example.tomlfile from the source code'sconfigdirectory intoconfig.toml, and fill in your configuration information according to the comments. - Double-click or execute the executable file in the terminal to start the service
- Open your browser and enter
http://127.0.0.1:8888to start using it (replace 8888 with the port you specified in the configuration file)
【If it is the desktop version, i.e., the release file with "desktop," see here】 Due to signing issues, the desktop version currently cannot be double-clicked to run or installed via dmg; you need to manually trust the application. The method is as follows:
- Open the terminal in the directory where the executable file (assuming the file name is KrillinAI_1.0.0_desktop_macOS_arm64) is located
- Execute the following commands in order:
sudo xattr -cr ./KrillinAI_1.0.0_desktop_macOS_arm64
sudo chmod +x ./KrillinAI_1.0.0_desktop_macOS_arm64
./KrillinAI_1.0.0_desktop_macOS_arm64
【If it is the non-desktop version, i.e., the release file without "desktop," see here】 This software is not signed, so when running on macOS, after completing the file configuration in the "Basic Steps," you also need to manually trust the application. The method is as follows:
-
Open the terminal in the directory where the executable file (assuming the file name is KrillinAI_1.0.0_macOS_arm64) is located
-
Execute the following commands in order:
sudo xattr -rd com.apple.quarantine ./KrillinAI_1.0.0_macOS_arm64 sudo chmod +x ./KrillinAI_1.0.0_macOS_arm64 ./KrillinAI_1.0.0_macOS_arm64This will start the service
This project supports Docker deployment; please refer to the Docker Deployment Instructions
KrillinAI provides a staged CLI suitable for scripting, automation pipelines, and AI Agent invocation. The CLI executes synchronously by default, outputs a single JSON line to stdout upon completion, and writes krillinai_manifest.json to the working directory for subsequent stages to reuse prior artifacts.
Build from source:
go build -o build/krillinai-cli ./cmd/cliCommand overview:
| Command | Purpose | Typical Outputs |
|---|---|---|
subtitle |
Generate subtitles from YouTube / Bilibili links or local videos; tries platform captions first, falls back to Whisper transcription | origin_language_srt.srt, target_language_srt.srt, bilingual_srt.srt, short_origin_mixed_srt.srt |
tts |
Generate target-language dubbing from target subtitles | tts_final_audio.wav, video_with_tts.mp4 |
render-horizontal |
Produce horizontal video: original + bilingual subtitles, or dubbed video + target subtitles | horizontal_bilingual.mp4 |
render-vertical |
Produce vertical video: original converted to vertical + short subtitles, or dubbed video + target subtitles | transferred_vertical_video.mp4, vertical_bilingual.mp4 |
pipeline |
Orchestrate multiple stages via --outputs |
Determined by selected stages |
cover |
Generate a cover image from the original cover and prompt templates | generated_cover.png |
Typical workflow:
# 1. Generate subtitles: original, target, bilingual, and vertical short subtitles
./build/krillinai-cli subtitle "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
--origin-lang en \
--target-lang zh_cn \
--workdir tasks/demo \
--caption-source any
# 2. Generate dubbing from target-language subtitles
./build/krillinai-cli tts \
--workdir tasks/demo \
--input-srt tasks/demo/target_language_srt.srt \
--line-mode target-only \
--video tasks/demo/origin_video.mp4
# 3. Produce horizontal bilingual-subtitle video
./build/krillinai-cli render-horizontal \
--workdir tasks/demo \
--video tasks/demo/origin_video.mp4 \
--subtitle tasks/demo/bilingual_srt.srt
# 4. Produce vertical short-subtitle video
./build/krillinai-cli render-vertical \
--workdir tasks/demo \
--video tasks/demo/origin_video.mp4 \
--subtitle tasks/demo/short_origin_mixed_srt.srt \
--major-title "今日话题" \
--minor-title "AI Video"Agent integration conventions:
- Parse the last JSON line on stdout and
krillinai_manifest.json— do not parse plain-text logs. - The
outputsfield records stage artifact paths; subsequent commands can pass only--workdirto reuse the manifest. - Supports
--dry-runto validate parameters and generate a manifest without downloading video or calling external AI services. - Handle errors by
error.kind:usage→ fix parameters,retryable→ retry,dependency→ installffmpeg/ffprobe/yt-dlp.
For a complete parameter reference, see CLI Capability Summary.
The repository also includes ready-to-use Agent Skills under skills/ so coding agents can call the CLI with stable conventions:
krillinai-cli: top-level routing skill for choosing subtitle, TTS, render, pipeline, or cover workflows.krillinai-subtitle,krillinai-tts,krillinai-render-horizontal, andkrillinai-render-vertical: stage-specific operating guides.krillinai-pipelineandkrillinai-cover: planning/reserved guides for pipeline orchestration and cover generation until those execution paths are fully wired.cli-contract.md: shared JSON, manifest, outputs, and error-handling contract.
Based on the provided configuration file, here is the updated "Configuration Help (Must Read)" section for your README file:
The configuration file is divided into several sections: [app], [server], [llm], [transcribe], and [tts]. A task is composed of speech recognition (transcribe) + large model translation (llm) + optional voice services (tts). Understanding this will help you better grasp the configuration file.
Easiest and Quickest Configuration:
For Subtitle Translation Only:
- In the
[transcribe]section, setprovider.nametoopenai. - You will then only need to fill in your OpenAI API key in the
[llm]block to start performing subtitle translations. Theapp.proxy,model, andopenai.base_urlcan be filled in as needed.
Balanced Cost, Speed, and Quality (Using Local Speech Recognition):
- In the
[transcribe]section, setprovider.nametofasterwhisper. - Set
transcribe.fasterwhisper.modeltolarge-v2. - Fill in your large language model configuration in the
[llm]block. - The required local model will be automatically downloaded and installed.
Text-to-Speech (TTS) Configuration (Optional):
- TTS configuration is optional.
- First, set the
provider.nameunder the[tts]section (e.g.,aliyunoropenai). - Then, fill in the corresponding configuration block for the selected provider. For example, if you choose
aliyun, you must fill in the[tts.aliyun]section. - Voice codes in the user interface should be chosen based on the selected provider's documentation.
- Note: If you plan to use the voice cloning feature, you must select
aliyunas the TTS provider.
Alibaba Cloud Configuration:
- For details on obtaining the necessary
AccessKey,Bucket, andAppKeyfor Alibaba Cloud services, please refer to the Alibaba Cloud Configuration Instructions. The repeated fields for AccessKey, etc., are designed to maintain a clear configuration structure.
Short Subtitle Configuration:
short_subtitle_max_chars: Maximum characters per line for English short subtitles (default: 20)- Designed for portrait/vertical videos
- Chinese text remains intact, English text is split according to this length
- Recommended value: 15-25
Please visit Frequently Asked Questions
- Do not submit useless files, such as .vscode, .idea, etc.; please use .gitignore to filter them out.
- Do not submit config.toml; instead, submit config-example.toml.
- Join our QQ group for questions: 754069680
- Follow our social media accounts, Bilibili, where we share quality content in the AI technology field every day.




