Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] DeepSeek AI Plugin #9274

Open
AE-Ismail opened this issue Jan 27, 2025 · 7 comments
Open

[Feature Request] DeepSeek AI Plugin #9274

AE-Ismail opened this issue Jan 27, 2025 · 7 comments

Comments

@AE-Ismail
Copy link

Is it possible to have a plugin for DeepSeek AI integrated into Subtitle Edit to help with the files, to give prompts to edit the text or time codes, or check the style and grammar of the text directly in the .srt file?

This was DeepSeek's response whin asked about this:

  1. Integration Options
    Plugin Development:

Subtitle Edit supports C# plugins. You could:

Write a plugin that uses DeepSeek's API to process subtitle text.

Add a button/menu item in Subtitle Edit to trigger grammar/style checks.

Requirements: C# knowledge, DeepSeek API access, and Subtitle Edit's source code or plugin template.

External Scripting:

Use Subtitle Edit's "Run External Tool" feature:

Export subtitles to a text file.

Process it via a Python/Node.js script that calls DeepSeek's API.

Re-import the corrected file.

Example workflow:

python
Copy
import requests

def correct_text(text, api_key):
response = requests.post(
"https://api.deepseek.com/v1/grammar_check",
headers={"Authorization": f"Bearer {api_key}"},
json={"text": text}
)
return response.json()["corrected_text"]
2. Key Considerations
Timing Preservation: Ensure corrections don’t alter subtitle timing or split lines beyond character limits.

Batching: Process multiple lines at once to reduce API calls (check DeepSeek’s rate limits).

Formatting: Retain formatting tags (e.g., italic) by excluding them from AI processing.

  1. Steps to Implement (External Script Example)
    Export Subtitles: Save as .srt or .txt from Subtitle Edit.

Run Script:

bash
Copy
python correct_subtitles.py input.srt output.srt --api_key YOUR_KEY
Re-import: Load the corrected file back into Subtitle Edit for final adjustments.

  1. Challenges & Tips
    Cost: DeepSeek API usage may incur fees; test with small batches first.

Local Models: For offline use, consider running a local AI model (e.g., GPT-2/3, LLaMA) via tools like Hugging Face’s transformers.

Validation: Always review AI suggestions—context matters (e.g., slang in subtitles might be intentional).

@M7-SiN
Copy link

M7-SiN commented Jan 28, 2025

And if it would also be available for the Auto-Translate Modules it will be perfect

@Tinagon
Copy link

Tinagon commented Jan 28, 2025

And if it would also be available for the Auto-Translate Modules it will be perfect

This would be amazing. I want an auto-translate with deepseek feature as well, it's very powerful and accurate from what I tested.

@M7-SiN
Copy link

M7-SiN commented Jan 28, 2025

And if it would also be available for the Auto-Translate Modules it will be perfect

This would be amazing. I want an auto-translate with deepseek feature as well, it's very powerful and accurate from what I tested.

indeed it is pretty Accurate even when translating slangs and hood vocabulary

@niksedk
Copy link
Member

niksedk commented Jan 28, 2025

In SE 4.0.11 you can use DeepSeek via Ollama

@AE-Ismail
Copy link
Author

AE-Ismail commented Jan 28, 2025

In SE 4.0.11 you can use DeepSeek via Ollama

So, we should download and setup Ollama for Windows and it will integrate with SE?

@niksedk
Copy link
Member

niksedk commented Jan 28, 2025

Yes :)

Image

Seems a bit slow on my computer - and it does not really work with Danish, but other languages are hopeful better.

@AE-Ismail
Copy link
Author

But we can't use it as I suggested in the original post to check the text for grammar and style, edit timecodes, etc. It's only for translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants