Coder Social home page Coder Social logo

cgsvv / aisubtitle Goto Github PK

View Code? Open in Web Editor NEW
378.0 378.0 81.0 2.54 MB

AI subtiltle tool. Translate your subtitle with GPT. 使用chatGPT来翻译你的字幕

Home Page: https://ai.cgsv.top

JavaScript 11.02% CSS 13.04% TypeScript 75.95%
bilibili chatgpt chatgpt-api gpt-3 openai translation youtube

aisubtitle's People

Contributors

cgsvv 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aisubtitle's Issues

分享一个prompt

看到这个issues,里面的“你是一个专业的字幕翻译员,现在我有一个字幕文件如下,请按照字幕的特性翻译该文件”,在给它添加一个角色,比如特定领域的:
"你是一个专业的字幕翻译员,同时也是一个计算机专业领域的专家,所以你的翻译应该更加专业化,现在我有一个字幕文件如下,请按照srt字幕格式的特性翻译该文件:"
翻译计算机类的视频效果会更好,以下是效果对比:

没有使用特定角色的
1
00:00:01,199 --> 00:00:04,199
开场白
2
00:00:15,379 --> 00:00:21,119
在我们开始之前,我想了解一些情况。
3
00:00:19,080 --> 00:00:23,220
你们当中有多少人知道……
4
00:00:21,119 --> 00:00:25,260
已经开始使用混沌理论了吗?
5
00:00:23,220 --> 00:00:27,840
形式上。
6
00:00:25,260 --> 00:00:31,019
我能看到你们举起手来吗?
7
00:00:27,840 --> 00:00:34,140
好的,你们当中有多少人没有听说过混沌理论?
使用特定角色的:
1
00:00:01,199 --> 00:00:04,199
开场白

2
00:00:15,379 --> 00:00:21,119
在我们开始之前,我想先了解一下

3
00:00:19,080 --> 00:00:23,220
你们有多少人其实是…

4
00:00:21,119 --> 00:00:25,260
已经开始实践混沌工程的了?

5
00:00:23,220 --> 00:00:27,840
了解过混沌工程的实际应用形态?

6
00:00:25,260 --> 00:00:31,019
能举手让我看看吗?

7
00:00:27,840 --> 00:00:34,140
好的,那你们中有多少人没有听说过混沌工程呢?

自定义OPENAI_API_URL

希望可以自定义API地址,换成第三方的或者社区代理的或者自己搭建的

Translation fails

Hello author, I'm a newcomer to this awesome project. However, when I get a valid api key from openai and want to translate the example subtitle in the website. I encounter the error below, how can I fix it? I'm looking forward to your reply, thank you.

"translate failedSyntaxError: Unexpected token A in JSON at position 0"

other LLM (llama2) support?

Hello, is there any plan to implement this wonderful tool for using with Meta's llama2 or other state-of-the-art LLM models?
Thanks a lot for your hardwork!

仍然有翻译文件失败,以及OpenAI key问题

显示translate file failed Error: translate file [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] failed
以及,我填了openAI的key,为啥还是显示translate failedError: rate limited. Please enter you OpenAI key
有什么头绪吗

Not able to run

Hey,
I found this repo and was really exciting with the possibilities. I tried deploying it, using the api from chatgpt, but i keep receiving the following error

translate failedSyntaxError: Unexpected token 'A', "A server e"... is not valid JSON

Do you know what it could be that i'm doing wrong? I'm not able to even translate the text that is already there as an example

Bad translation

As I can see each line of subs (@timecode) is processed independently, without surrounding context.
This makes translation very rough.

The much better results could be achieved translating text as a whole.
(But I understand, that it can be difficult to set proper timecodes then)

配置变量问题咨询

关于redis的变量有四行,可是我开的redis只有一条URL,怕配错了,希望大佬写个注释😀

Easily monetise your project with AI Pay

It's sad to see a project with over 350 stars stop. I want to help!

I've built a tool that is safer for users than handing over their API key and can provide a source of donations.

AI Pay is a tool to allow websites to implement AI for free and the user of the website pays for their individual AI usage. It’s similar to users bringing a universal API key to websites but without the risk of API key theft and users can specify a maximum usage budget. Websites receive a small markup on the AI usage costs and 5% of an affiliate user’s future credit purchases. This should provide enough money to cover all hosting costs as well as a little on top.

If you are interested check out the AI Pay docs: https://www.joinaipay.com/docs

or email me directly [email protected] and I'd be happy to help implement AI Pay.

网页版翻译日语字幕失败

Error: translate file [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] failed

是翻译的日语srt文件

fatal error

image

I was using the site normally till this happens, usually after I've translated quite a lot of subtitles each day. Is this a bug or I'm suppose to do something?

Thanks so much for the great tool!

网页版翻译失败

弹窗显示翻译字幕文件失败Error: translate file [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] failed

项目是需要设置代理吗

我本地起的项目访问openai的接口超时了,我想应该是网络的问题,想知道要怎么设置代理?

API error [TypeError: fetch failed] {
cause: [ConnectTimeoutError: Connect Timeout Error] {
name: 'ConnectTimeoutError',
code: 'UND_ERR_CONNECT_TIMEOUT',
message: 'Connect Timeout Error'
}
} fetch failed

环境变量配置问题

请问
BILIBILI_SESSION_TOKEN=
SAVESUBS_X_AUTH_TOKEN=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
UPSTASH_RATE_REDIS_REST_URL=
UPSTASH_RATE_REDIS_REST_TOKEN=
NEXT_PUBLIC_SENTRY_DSN=
这些变量都要怎么配置,小白一枚,谢谢。。。。

Connect Timeout Error

=====use user api key=====
payload {
model: 'gpt-3.5-turbo',
messages: [
{
role: 'system',
content: '你是一个专业的翻译。请逐行翻译下面的文本到中文,注意保留数字和换行符,请勿自行创建内容,除了翻译,不要输出任何其他文本。'
},
{
role: 'user',
content: '8866\nMi ley no ha sido votada solamente\n\n4744\ny tal vez ni principalmente por la\n\n4131\nclase media, pero ahora lo que él\n\n4330\nvehicula es la idea, nacida en la\n\n1388\nclase media, que el pueblo bueno\n\n4988\nes el de la clase media.\n\n4024\nPues los otros son, lo ven, en los\n\n7415\ncomentarios, muy...\n\n7450\nse escuchan palabras de gran\n\n6276\ndesprecio, son todos parásitos\n'
}
],
temperature: 0,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
max_tokens: 1024,
stream: false,
n: 1,
res_keys: [ 8866, 4744, 4131, 4330, 1388, 4988, 4024, 7415, 7450, 6276 ]
}
API error [TypeError: fetch failed] {
cause: [ConnectTimeoutError: Connect Timeout Error] {
name: 'ConnectTimeoutError',
code: 'UND_ERR_CONNECT_TIMEOUT',
message: 'Connect Timeout Error'
}
} fetch failed

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.