GithubHelp home page GithubHelp logo

live-translations's Introduction

Live Translations

Live Translations is a real-time multilingual transcription and translation service. It uses Google Cloud's Speech-to-Text, Translation, and Text-to-Speech APIs to transcribe and translate spoken language into multiple languages in real-time.

Table of Contents

  1. Overview
  2. Features
  3. Installation
  4. Google Cloud Setup
  5. Usage
  6. Troubleshooting
  7. Contributing
  8. License
  9. Contact

Features

  • Real-time transcription and translation
  • Supports multiple languages - Noise reduction - Speaker diarization

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)

Setting up the Environment

Before you install the dependencies, we recommend you to set up a Python virtual environment. This is an isolated environment where you can install Python packages without interfering with your system's Python setup. Here's how to set it up:

  1. Open a terminal and navigate to the root folder of the project.

  2. Run the following command to create a virtual environment named venv:

    python3 -m venv venv

    This will create a new folder named venv in your project root directory.

  3. Activate the virtual environment:

    • On Windows, run:

      .\venv\Scripts\activate
    • On Unix or MacOS, run:

      source venv/bin/activate

    When the virtual environment is activated, your terminal prompt will be prefixed with (venv).

Generating requirements.txt (if it doesn't exist)

If the requirements.txt file doesn't exist in the project root directory, you can generate it. This file lists all the Python packages that your project depends on. Here's how to generate it:

  1. Make sure you have activated your virtual environment and installed all the necessary packages.

  2. Run the following command:

    pip freeze > requirements.txt

This will create a requirements.txt file and fill it with a list of all installed packages and their versions. This is useful for other developers who want to install all the project dependencies in one go.

Installing Dependencies

With the virtual environment activated, you can now install the project dependencies. These are listed in the requirements.txt file in the project root directory. To install them, run:

pip install -r requirements.txt

This will download and install all the required packages.

Remember to always activate the virtual environment before you start working on the project. When you're done, you can deactivate the virtual environment by simply running:

deactivate

Google Cloud Setup

  1. Install the Google Cloud SDK following the instructions here.

  2. Authenticate with Google Cloud:

    gcloud auth login
    
  3. Set up a Google Cloud project and enable the Speech-to-Text, Translation, and Text-to-Speech APIs.

  4. Download your service account key as a JSON file and save it in the project directory.

  5. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of your service account key:

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-file.json"
    

Usage

  1. Start the server:

    python server.py
  2. Open your web browser and navigate to http://localhost:5000/controls.

  3. From here you can style the translation pages to your liking. The changes do not reflect on the controls page.

  4. Select your microphone and the languages you want to translate to, then click the "Start" button to start transcribing and translating.

  5. Click any language tag in the supported languages section to open a new tab for that language.

Troubleshooting

If you encounter issues with the third-party packages used in this project, you can visit their respective support pages:

If you're still having trouble, feel free to open an issue on this repository.

Contributing

Contributions are welcome! Please read the contributing guidelines first.

License

This project is licensed under the terms of the MIT license.

Contact

If you have any questions, feel free to contact me.

live-translations's People

Contributors

cleman25 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.