Code Monkey home page Code Monkey logo

occ-ai / obs-polyglot Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 5.0 121 KB

Realtime local AI translation services for OBS based on CTranslate2

Home Page: https://obsproject.com/forum/resources/polyglot-real-time-local-translation-ai-service-for-obs.1818/

License: GNU General Public License v2.0

CMake 59.67% Shell 5.54% C 2.36% C++ 32.44%
ctranslate2 obs obs-plugin obs-studio obs-studio-plugin real-time-translation realtime-translator translation

obs-polyglot's People

Contributors

royshil 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

Watchers

 avatar  avatar

obs-polyglot's Issues

overload CPU

Hi, i noted some strange behavior when polyglot http server is started.
Check please attachments:

Started
Stop

How can i fix this issue?

It seems that stopping service can crash OBS

  1. Install plugin in OBS

  2. Setup models:

  • model: nllb-200-distilled-600M-int8
  • SPM: flores200_sacrebleu_tokenizer_spm.model
  1. Start service "Start / Stop HTTP Server"

  2. Make some requests to verify it is up and running
    _note: I gave up with testing with plugin: URL Source
    note: I used VS code Thunder client with some requests, but Curl commandline sould do it too.

  3. Make sure last request is completed
    _note: some known languages did not transalte at all ie. "ita_Latin"

  4. Stop server with Start / Stop HTTP Server button in PolyGlot Translate plugin

Observed: OBS crashed

Japanese language support

Hello!

I'm not sure how doable this is as I'm not overly familiar with LASER3, but from what I can tell, there isn't an NLLB code on the provided list for Japanese or Chinese. Is there a way to translate those languages, or alternatively is there a chance the feature could be added?

Build release request for GPU and Windows Powershell build script error question

Builds fail frequently in Windows 10.

It is a very convenient tool, but it takes up a lot of CPU space. As it approaches 90% on older PCs, there is a risk in broadcasting. It seemed like the cuda version was included in the recent pull request, so I tried to build it. It would be especially nice to have both versions 11.8 and 12. That's not the problem, you have to build it through a Powershell script on Windows, but when I used a light Windows tweak version, I couldn't resolve the Powershell and winget dependencies. (I'm sorry. I don't use the Windows Market Store because I think Windows is too heavy.) I would like to ask if it is possible to add a build for cuda gpu as a release version. I have little knowledge of Powershell cmake builds, and since I've been doing a lot of broadcasting work lately, it's difficult to have a full-fledged plug-in development environment.

There are two places where the problem occurred.

.github/scripts/Build-Windows.ps1 -Target x64 -CMakeGenerator "Visual Studio 17 2022"

This command says that there is no option called CMakeGenerator. I couldn't find it in the ps1 file, and I thought it was a problem with the development environment, so I installed the latest version of cmake msi and tried opening the Powershell window again with administrator privileges, but it didn't work.

Exclude the Cmake Generator option.
I tried adding only the two x64 Release options, but an error occurred because the winget dependency was not resolved as mentioned before in the Build function execution part.

The 0.0.2 release was recently updated, and I apologize as a former developer for asking this question.

However, from the perspective of OBS Lite users, it seems difficult to build and use the GPU version plugin directly.

My voice text extracted with the localvocal plugin

The goal is to display multi-language subtitles on the screen using polyglot, but the CPU usage is quite high.

The GPU previously used whisper-faster to edit subtitles after video editing, so I installed the nvidia 4070ti, which leaves graphics resources, but it is unfortunate that it runs only on the CPU without hardware acceleration.

Error 404 (CORS header ‘Access-Control-Allow-Origin’ missing) when calling /translate

Hello !

I want to build a streamelements widget that use OBS-Polyglot. I have test my request through insomnia, it get me a 200 OK with the translation but when i use this code on a widget streamelements, i've got a CORS Error.

Would it be possible to correct this issue ?
Thank you very much for all your hard work on Polyglot.

const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"text":"Bonjour monde.","source_lang":"fr_Latn","target_lang":"eng_Latn"}'
};

fetch('http://127.0.0.1:18080/translate', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

image

On the streamelements widget:
image

Unable to load hugging face's CT2 model

I have tried every single Hugging Face CTranslate 2 models under 6GB and I always get the same error : "Failed to load CT2 model. This model cannot be used as a sequence to sequence model.". Once I even got "someexception.json needs to be defined" or smth.
Please help.

error parsing json

Hi, i have this error something when i try to use this plugin.

I use cloud closed captions to get captions and save them in a text source. Those are my settings:

image

image

That's polygon settings:

image

And those are url source settings:
image

This is the body. I didn't find it on the page so i write it from youtube:
{"text":"{{input}}", "source_lang":"eng_Latn","target_lang":"ita_Latn"}

image

To test if this works or not i enable the preview on captions and start to talk. You can ses on top captions text, on bottom the translation:
image

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.