LinguaStream / README.md
Maaz1's picture
Update README.md
e3ab549 verified
|
raw
history blame contribute delete
2.5 kB
---
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
1. Clone this repository:
```bash
git clone https://github.com/Maaz1/LinguaStream.git
cd LinguaStream
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Install FFmpeg:
- On Ubuntu/Debian: `sudo apt-get install ffmpeg`
- On macOS (with Homebrew): `brew install ffmpeg`
- On Windows: Download from [FFmpeg website](https://ffmpeg.org/download.html)
4. Set up your API key:
- Copy `.env.example` to `.env`
- Add your AssemblyAI API key to the `.env` file (to get audio text)
## Usage
1. Run the app:
```bash
python app.py
```
2. Open the provided URL in your browser
3. Upload a video file
4. Select source and target languages
5. Click "Translate" and wait for processing
## Deployment on Hugging Face Spaces
This project is configured for easy deployment to [Hugging Face Spaces](https://huggingface.co/spaces). To deploy:
1. Fork this repository
2. Create a new Space on Hugging Face
3. Connect your GitHub repository
4. Set the required environment variables (ASSEMBLYAI_API_KEY)
5. 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