jimmysu0309/shinkansen
快速、流暢的網頁及 YouTube 字幕翻譯擴充功能。支援 8 種目標語言與多種 AI 引擎,資料不經過第三方
What it is
Shinkansen (Japanese for "bullet train") is a browser extension available for Chrome, Firefox, and Safari (including iOS/iPadOS). It provides fast, private translation for web pages, YouTube subtitles, and various document files. It supports 8 target languages: Traditional Chinese, Simplified Chinese, English, Japanese, Korean, Spanish, French, and German.
How it uses AI
It offers three translation engines:
- Google Gemini: An AI/LLM engine that provides the highest quality translation. Requires an API key.
- Google Translate: A free, unofficial web endpoint (no API key needed) that is faster but less nuanced.
- Custom OpenAI-compatible models: You can connect any endpoint that follows the OpenAI API format, such as OpenRouter, Together, Groq, or a local Ollama/llama.cpp server. This allows you to use models from Anthropic, Llama, Qwen, Mistral, and others.
Beyond simple translation, Shinkansen uses LLMs for AI sentence segmentation of YouTube's auto-generated subtitles. YouTube's automatic speech recognition often outputs broken, fragmented words; the AI re-groups them into complete sentences before translating, greatly improving readability.
Key Features
- Web Translation: Replaces text directly on the page, preserving the original layout. It respects HTML
translate="no"andnotranslatetags, so names, codes, and icon fonts are left untouched. - Document Translation: Handles PDF, EPUB, Word (.docx), TXT, Markdown, HTML, and subtitle files (SRT/WebVTT/ASS).
- PDFs keep their original layout in the output.
- Word files write the translation back into the original file, preserving styles, tables, images, and comments. It can also output a bilingual version.
- Subtitle files preserve timestamps, numbering, and style blocks exactly.
- Cross-tab Continuation: If you open a new tab from a translated page (e.g., by clicking a link), the new tab is automatically translated with the same settings.
- Terminology Management: You can import a fixed glossary (via CSV) to ensure consistent name translations across chapters. This glossary takes priority over automatic consistency. It also includes a built-in "forbidden words" list to prevent AI models from using non-Taiwanese terms (like 視頻 instead of 影片) when translating into Traditional Chinese.
- Customizable Shortcuts: Keyboard shortcuts can be remapped, and iOS supports a four-finger tap gesture to trigger translation.
Privacy
Files are parsed entirely locally in your browser. Only the text sent to the translation engine leaves your device. Your browsing data is never routed through third-party servers. The only exception is that translating PDFs into Simplified Chinese, Japanese, or Korean will download the necessary fonts (10–20 MB) once from the project's website; this request contains no document content.
Known Quirks
Firefox's "HTTPS-Only Mode" will force http:// requests to https://, which breaks connections to local HTTP endpoints like Ollama (http://localhost:11434) or llama.cpp. You must disable this mode or add an exception for those addresses.
Related
- Project
- Project
- Project
- Project
- Project