Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.27.1
metadata
title: LinguaStream
sdk: gradio
emoji: π
colorFrom: yellow
colorTo: purple
pinned: true
short_description: 'A Multilingual Audio and Video dubbing tool. '
sdk_version: 5.25.2
Video Translator π
A complete video translation system that converts videos into multiple languages by translating both subtitles and audio.
Features
- π¬ Video to text transcription using AssemblyAI
- π€ Translation of transcripts to multiple languages
- π Text-to-speech generation in target languages
- π Subtitle generation and embedding
- ποΈ Final video with translated audio and subtitles
Supported Languages
- English
- Spanish
- French
- German
- Japanese
- Hindi
- And more...
Installation
- Clone this repository:
git clone https://github.com/Maaz1/LinguaStream.git
cd LinguaStream
- Install dependencies:
pip install -r requirements.txt
Install FFmpeg:
- On Ubuntu/Debian:
sudo apt-get install ffmpeg
- On macOS (with Homebrew):
brew install ffmpeg
- On Windows: Download from FFmpeg website
- On Ubuntu/Debian:
Set up your API key:
- Copy
.env.example
to.env
- Add your AssemblyAI API key to the
.env
file (to get audio text)
- Copy
Usage
- Run the app:
python app.py
- Open the provided URL in your browser
- Upload a video file
- Select source and target languages
- Click "Translate" and wait for processing
Deployment on Hugging Face Spaces
This project is configured for easy deployment to Hugging Face Spaces. To deploy:
- Fork this repository
- Create a new Space on Hugging Face
- Connect your GitHub repository
- Set the required environment variables (ASSEMBLYAI_API_KEY)
- Deploy!
Project Structure
video-translator/
βββ app.py # Main Gradio app entry point
βββ config.py # Configuration and constants
βββ src/ # Source code
β βββ audio/ # Audio processing
β βββ video/ # Video processing
β βββ subtitles/ # Subtitle handling
β βββ utils/ # Utilities and helpers
βββ outputs/ # Output directory
Environment Variables
ASSEMBLYAI_API_KEY
: API key for AssemblyAI (required)DEBUG
: Set to "True" for debug logging (optional)OUTPUT_DIR
: Custom output directory path (optional)
License
MIT License