MG

maktail/gemini-srt-translator

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

363 stars 质量 75 趋势 34MIT

使用 Google Gemini AI 翻译字幕的 Python 工具

概览

如果你遇到太多模型过载的信息,请关闭流媒体模式。 利用Google Gemini AI的强大功能翻译SRT和ASS字幕文件!🚀 是一款强大的Python工具,利用Google Gemini AI的强大功能翻译字幕文件。非常适合需要快速、准确且可定制翻译视频、电影和系列的任何人。 - 🔤 :将.srt和.ass字幕文件翻译成Google Gemini AI支持的多种语言。- 🎙️ :利用Gemini的音频功能将音频或视频文件直接转录成字幕。- ⏱️ :确保翻译后的字幕保持原始文件的时间戳和原生SRT/ASS格式。- 💾 :轻松从中断的翻译中恢复。- 🧠 :利用思维和推理能力,实现更准确的上下文翻译(支持Gemini 2.5和3型号)。- 🖥️ :完整的命令行界面,便于自动化和脚本编写。

概述(AI 翻译)

[!警告] 如果你遇到太多模型过载的信息,请关闭流媒体模式。

🌟 双子座SRT翻译器

利用Google Gemini AI的强大功能翻译SRT和ASS字幕文件!🚀


✨ 概述

Gemini SRT 翻译器是一款强大的Python工具,利用Google Gemini AI的强大功能翻译字幕文件。非常适合需要快速、准确且可定制翻译视频、电影和剧集的人。


  • 🔤 字幕翻译:将 .srt 和 .ass 字幕文件翻译成 Google Gemini AI 支持的多种语言。
  • 🎙️ 转录:利用Gemini的音频功能将音频或视频文件直接转录成字幕。
  • ⏱️ 时间与格式:确保翻译字幕保持原始文件的时间戳和原生SRT/ASS格式。
  • 💾 快速简历:轻松从中断的翻译处继续。
  • 🧠 高级AI:利用思维和推理能力实现更准确的语境翻译(适用于Gemini 2.5和3型号)。
  • 🖥️ CLI 支持:完整的命令行界面,便于自动化和脚本编写。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

[!WARNING] If you are experiencing too many model overloaded messages, switch off streaming mode.

🌟 Gemini SRT Translator

Translate SRT and ASS subtitle files using the power of Google Gemini AI! 🚀


✨ Overview

Gemini SRT Translator is a powerful python tool to translate subtitle files using the power of Google Gemini AI. Perfect for anyone needing fast, accurate, and customizable translations for videos, movies, and series.


  • 🔤 Subtitle Translation: Translate .srt and .ass subtitle files to a wide range of languages supported by Google Gemini AI.
  • 🎙️ Transcription: Transcribe audio or video files directly into subtitles using Gemini’s audio capabilities.
  • ⏱️ Timing & Format: Ensures that the translated subtitles maintain the exact timestamps and native SRT/ASS formatting of the original file.
  • 💾 Quick Resume: Easily resume interrupted translations from where you left off.
  • 🧠 Advanced AI: Leverages thinking and reasoning capabilities for more contextually accurate translations (available on Gemini 2.5 and 3 models).
  • 🖥️ CLI Support: Full command-line interface for easy automation and scripting.
  • ⚙️ Customizable: Tune model parameters, adjust batch size, and access other advanced settings.
  • 🎞️ Subtitle Extraction: Extract and translate native SRT or ASS subtitles from video files automatically (requires FFmpeg).
  • 🎵 Audio Context: Extract audio from a video file or provide your own to improve translation accuracy (requires FFmpeg).
  • 📜 Description Support: Add a description to your translation job to guide the AI in using specific terminology or context.
  • 📋 List Models: Easily list all currently available Gemini models to choose the best fit for your needs.
  • 🔄 Auto-Update: Keep the tool updated with automatic version checking and update prompts.
  • 📝 Logging: Optional saving of progress and ‘thinking’ process logs for review.

📦 Installation

Basic:

pip install --upgrade gemini-srt-translator
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add maktail/gemini-srt-translator
新手?先看 mcpskill.org 教程 →