TranLingo is an innovative speech-to-speech translation application that not only translates your words but also speaks them back in a cloned version of your own voice! Experience near real-time voice translation with personalized voice output.
TranLingo aims to break down language barriers by providing a seamless speech-to-speech translation experience. A key feature is its ability to perform one-shot voice cloning, requiring only 10-15 seconds of your audio. This cloned voice is then used for the Text-to-Speech (TTS) output in the target language, offering a more personal and engaging translation.
The voice cloning is language-specific. For instance, to translate your speech into Spanish and have it spoken in your voice, TranLingo first helps you train a Spanish voice clone. This is achieved by using the Gemini API for accurate transliteration of your native language input into Spanish text, which then serves as the training data for your Spanish voice profile.
Follow these instructions to set up and run TranLingo locally on your machine.
Clone the repository:
git clone <your-repository-url>
cd <your-repository-name>
Frontend (Next.js): Navigate to the source directory (likely the root or a specific frontend folder) and install dependencies:
cd path/to/your/nextjs/source_directory
npm install
Backend (Flask - Main Application):
flask directory:
cd flask
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
import statements in flask/main.py and flask/app.py (and any other Python files in this service). For example:
pip install Flask <library1> <library2> ...
(Ideally, you would create a requirements.txt file in this directory for easier dependency management: pip freeze > requirements.txt after installing, and then others can use pip install -r requirements.txt)Backend (Flask - Cloning Service):
cloning directory:
cd ../cloning # Assuming it's a sibling to the 'flask' directory, adjust path if needed
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install Flask <libraryA> <libraryB> ...
Ensure all your necessary API keys and database connection strings are correctly configured in your environment variables or project configuration files.
Start the Frontend (Next.js): In the Next.js source directory:
npm run dev
This will typically start the frontend on http://localhost:3000.
Start the Main Flask Backend:
In the flask directory (with its virtual environment activated):
flask run
This will typically start the main backend service on http://localhost:5000.
Start the Cloning Flask Backend:
In the cloning directory (with its virtual environment activated):
flask run
This might also try to start on http://localhost:5000. You'll need to configure one of the Flask apps to run on a different port to avoid collision. For example, to run the cloning service on port 5001:
flask run --port=5001
(Make sure your frontend is configured to call the correct backend ports.)
Once all services are running, you should be able to access TranLingo through your browser at the Next.js development server URL (e.g., http://localhost:3000).
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
(You can add more specific contribution guidelines here, e.g., coding standards, branch naming conventions.)
https://github.com/user-attachments/assets/38b549bf-011f-4f57-a205-ed48f9ee12d8
This project is licensed under the MIT License - see the LICENSE.md file for details (assuming you choose MIT and add a LICENSE.md file).
13 commits
TypeScript
67.4%
Python
26.1%
CSS
4.6%
JavaScript
1.8%
TranLingo is an innovative speech-to-speech translation application that not only translates your words but also speaks them back in a cloned version of your own voice! Experience near real-time voice translation with personalized voice output.
TranLingo aims to break down language barriers by providing a seamless speech-to-speech translation experience. A key feature is its ability to perform one-shot voice cloning, requiring only 10-15 seconds of your audio. This cloned voice is then used for the Text-to-Speech (TTS) output in the target language, offering a more personal and engaging translation.
The voice cloning is language-specific. For instance, to translate your speech into Spanish and have it spoken in your voice, TranLingo first helps you train a Spanish voice clone. This is achieved by using the Gemini API for accurate transliteration of your native language input into Spanish text, which then serves as the training data for your Spanish voice profile.
Follow these instructions to set up and run TranLingo locally on your machine.
Clone the repository:
git clone <your-repository-url>
cd <your-repository-name>
Frontend (Next.js): Navigate to the source directory (likely the root or a specific frontend folder) and install dependencies:
cd path/to/your/nextjs/source_directory
npm install
Backend (Flask - Main Application):
flask directory:
cd flask
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
import statements in flask/main.py and flask/app.py (and any other Python files in this service). For example:
pip install Flask <library1> <library2> ...
(Ideally, you would create a requirements.txt file in this directory for easier dependency management: pip freeze > requirements.txt after installing, and then others can use pip install -r requirements.txt)Backend (Flask - Cloning Service):
cloning directory:
cd ../cloning # Assuming it's a sibling to the 'flask' directory, adjust path if needed
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install Flask <libraryA> <libraryB> ...
Ensure all your necessary API keys and database connection strings are correctly configured in your environment variables or project configuration files.
Start the Frontend (Next.js): In the Next.js source directory:
npm run dev
This will typically start the frontend on http://localhost:3000.
Start the Main Flask Backend:
In the flask directory (with its virtual environment activated):
flask run
This will typically start the main backend service on http://localhost:5000.
Start the Cloning Flask Backend:
In the cloning directory (with its virtual environment activated):
flask run
This might also try to start on http://localhost:5000. You'll need to configure one of the Flask apps to run on a different port to avoid collision. For example, to run the cloning service on port 5001:
flask run --port=5001
(Make sure your frontend is configured to call the correct backend ports.)
Once all services are running, you should be able to access TranLingo through your browser at the Next.js development server URL (e.g., http://localhost:3000).
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
(You can add more specific contribution guidelines here, e.g., coding standards, branch naming conventions.)
https://github.com/user-attachments/assets/38b549bf-011f-4f57-a205-ed48f9ee12d8
This project is licensed under the MIT License - see the LICENSE.md file for details (assuming you choose MIT and add a LICENSE.md file).
13 commits
TypeScript
67.4%
Python
26.1%
CSS
4.6%
JavaScript
1.8%