Giter Club home page Giter Club logo

gpt_subtitles's People

Contributors

ifan24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gpt_subtitles's Issues

more APIs

please add more APIs like google gemini, we can use it for free

This CTranslate2 package was not compiled with CUDA support 请问这是什么原因

lib3/issues/3020
warnings.warn(
Local video file: https://www.youtube.com/watch?v=UYT2CikcS8I
Traceback (most recent call last):
File "/Applications/APP/GPT_subtitles.git/main.py", line 347, in
subtitle_processor.process(args.no_transcribe)
File "/Applications/APP/GPT_subtitles.git/main.py", line 292, in process
transcript, srt_file = self.transcribe_audio()
File "/Applications/APP/GPT_subtitles.git/main.py", line 143, in transcribe_audio
model = WhisperModel(self.model, device="cuda", compute_type="float16")
File "/Users/huang/Library/Python/3.9/lib/python/site-packages/faster_whisper/transcribe.py", line 130, in init
self.model = ctranslate2.models.Whisper(
ValueError: This CTranslate2 package was not compiled with CUDA support

疑问与建议

我目前在找gpt翻译字幕的项目,发现有些是基于网页的,有些是基于服务器的,发现这个符合我需求可以直接使用py脚本实现。

我看这个项目是可以把视频转录成字幕再翻译字幕。我想问能不能仅使用后面的本地字幕翻译功能,我看中文文档好像是可以但是不太确定。仅使用字幕翻译功能,是否需要下载 Whisper 模型,我想后期需要音频转录功能再下载也不迟。

我希望可以设置socks5代理来请求网络连接,我知道有些人是开tun模式,不过我习惯socks5,不想被代理软件接管系统网络。

频繁翻译出错问题

  1. 有时候连续翻译字幕文件会出现Anthropic's server encountered an error while processing your request. Please try again later,
    并且如果再次点击翻译missing Line 只会翻译 1 页(30batch size )然后又报同样错误,或者需要等待一段时间才能使用

    触发程度:非常频繁

  2. 有时候翻译过程中报错,Token花费了 但是字幕并没有填充,又得重头开始翻译

    触发程度:很少

  3. 如果字幕文件中的个别字体出现乱码(比如菱形方块问号),那么翻译会无法进行需要手动删除

    触发程度:很少

剩余Token:充足
账户订阅:基础会员
翻译类型:英文->简体中文
使用模型:claude-3-Haiku、claude-3-Sonnet

大佬你好.很好的项目.我有点想法你看看合适吗

这个项目还需要下载whisper 需要很大的内容.而且对机器也有要求.比较麻烦
1,能否直接调用whisper api进行转录.这样更便捷.(whisper api对大小有限制.可以设置分割之后在合并https:www.youtube.com/watch?v=-FtsoKryhPY )这个视频它是把超过25M大小的视频进行了分割成24M,之后在合并再对齐分割后造成的时间轴不对齐问题
2.直接目前调用chat gpt api进行翻译.会有问题.比如上下文.比如翻译更糟糕之类的这个可以调用 deepl api 会比谷歌更好.
3. 你里面提到了 webGUI 要用小模型.(其实用第一条的whisper api 直接是最大模型.)

no English translation on Whisper

for some reason the code only translate to zh even if you change the parameter to en, I used to be able to translate to english but not anymore

Please add multiple target language support

I wish to translate the same mp4 video into multiple language sub tracks. Can you offer the specification of multiple languages in the --target_langauge parameter? Then, the process of transcribing audio wouldn't have to be repeated multiple times (you could also offer an option to not recreate transcribed audio if the resulting transcripted SRT file is already present, to save time - if this option is not specified then the package could ask the user to recreate the file or use the existing one).

Then, possibly, you could have the option to run the translations in subprocesses since they do not depend on one another, and only on prerequisites already computed, this could be disabled on smaller systems without the computing capacity to accommodate this. 

PS. I have a particular process, when I have translated SRT files in hand (original English, Simplified Chinese, Korean in my case) I use the following command to quickly have the subs contained within my single mp4 video file, and I use a tool like VLC to select a sub track (by default no subs are displayed) :

ffmpeg -i Lesson3.mp4 -i Lesson3.srt -i Lesson3_SimplifiedChinese.srt -i Lesson3_Korean.srt -map 0:v -map 0:a -map 1:s -map 2:s -map 3:s -c:v copy -c:a copy -c:s mov_text Lesson3_Subtitled.mp4

I am not combining dual languages in my SRT files, although I can see some users may need this, I only need the base language SRT files as input to my process.

gpt返回json

[
......
{
'index': 136,
'original_text': 'right?'
},
......
]

大佬,经过我大量翻译的经验有时会出现json 缺失translation属性的情况,这时候会报一个ValueError: invalid literal for int() with base 10: '{' 的错误,想到一种临时处理的办法,这种情况很少出现,一两个单词这样也没啥影响原文理解。
for obj in data["current_batch_subtitles_translation"]:
if 'translation' not in obj:
obj['translation'] = obj['original_text']

不能使用了吗?

使用 pip install -r requirements.txt 命令安装所需的依赖项失败。
无法为sentencepiece构建轮子(wheel):

这个错误发生在尝试编译sentencepiece这个Python库时。错误信息中提到了无法打开一个叫做“sentencepiece_processor.h”的文件。这通常意味着在构建过程中缺少了必要的头文件或依赖。
另外,还出现了一个编译器警告,关于/MD和/MT选项的冲突。这表明在编译设置中可能存在一些不一致。
无法从GitHub克隆openai/whisper:

这个错误是在尝试从GitHub克隆whisper库时发生的。错误信息“fatal: unable to access 'https://github.com/openai/whisper.git/': Failure when receiving data from the peer”表明在网络连接过程中出现了问题。这可能是由于网络问题、GitHub服务器问题或者安全设置(如防火墙)阻止了访问。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.