srt-ai
srt-ai copied to clipboard
Custom route.ts pointing to local gpt4free: shifted linenumbers -> suddenly added AI response? :-)
My setup in route.ts
...
// const response = await fetch("https://api.openai.com/v1/chat/completions", {
const response = await fetch("http://localhost:1337/v1/chat/completions", {
headers: {
"Content-Type": "application/json",
// Authorization: Bearer ${process.env.OPENAI_API_KEY}
,
},
...
Input File:
1
00:00:05,672 --> 00:00:07,674
Mr. Suero?
2 00:00:20,687 --> 00:00:22,272 Ah.
3 00:00:22,272 --> 00:00:25,275 Victor "Victory" Suero.
4 00:00:25,275 --> 00:00:26,777 Miles Sellars.
Output File: 1 00:00:05,672 --> 00:00:07,674 Certainly! Here is the translation to Dutch with the "
2 00:00:20,687 --> 00:00:22,272 " segment separator:
Meneer Suero?
3 00:00:22,272 --> 00:00:25,275 Ah.
4 00:00:25,275 --> 00:00:26,777 Victor "Victory" Suero.
Any Idea to fix this ?