Spaces:
Running
Running
File size: 2,503 Bytes
c2129ca 524234e c2129ca e3ab549 4669a9d c2129ca 2f42eba 952467c a83c483 952467c a83c483 952467c c2129ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
---
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 |