Git Product home page Git Product logo

live-translation-for-obs's Introduction

live-translation-for-obs

This project is a django server than runs locally (not remotely yet) takes your microphone stream on the backend as input and sends live translation of everything said in previous 5s to the frontend (localhost:8000) with white dubs over black background. It uses pyaudio and the library speech_recogntion and also the deepl.com api (you need an api key). For unlimited translation per months the fees starts at around 7$. The free version only allows 500 000 characters a month.

Demo:

Pre-requisites

  • OBS
  • Python 3.10
  • python pipx and poetry installed

Installation 1: Get the deepl api key

  1. Go to https://www.deepl.com/en/docs-api
  2. Create an account (they will ask your credit card info even for the free tier).
  3. Go account and get the key at the bottom.
  4. On the server directory create a ".env" file.
  5. Write your api key in the file: DEEPL_API_KEY = your key.

Installation 2: start the local python django server

1.Go to the server directory.

  1. Run poetry init, poetry install, and poetry shell

  2. Run server by running (on windows) python manage.py runserver on the console (no admin required).

  3. Note the audio ID(s) corresponding to your recording device(s).

  4. In the twitchlivetranslation/settings.py replace the two first python variable id with your 1 or 2 audio devices.

  5. Stop (ctrl + c) and re-run server.

Installation 3: Create the OBS source

Now that you have the live translation server running on your machine you can start the recording and start translating. The translation starts as soon as something (obs) goes to the address http://localhost:8000

For this, simply add a browser source on OBS to this url.

Known issues

  • no 2 devices support yet.

live-translation-for-obs's People

Contributors

lil-sussy avatar

Watchers

 avatar

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.