A multilingual speech-to-speech translation system that detects the input language using custom GMM models, transcribes, translates, and synthesizes speech. Supports English, French, Arabic, Spanish, Korean, and Moroccan Darija.
# GlobalVoice: Multilingual Speech-to-Speech Translation System
A complete end-to-end multilingual speech-to-speech translation platform that automatically detects the input language, transcribes speech to text, translates it to a target language, and synthesizes the translated text back to speech.
## Features
- **Automatic Language Detection**: Uses custom-trained GMM (Gaussian Mixture Models) to identify the input language
- **Speech Transcription**: Powered by OpenAI's Whisper model for accurate speech-to-text conversion
- **Text Translation**: Utilizes Google Translate API for high-quality language translation
- **Speech Synthesis**: Generates natural-sounding audio using Google Text-to-Speech (gTTS)
- **User-Friendly GUI**: Modern PyQt6 interface with three intuitive screens
- **Multi-language Support**: Supports 6 languages including English, French, Arabic, Spanish, Korean, and Moroccan Darija
## System Architecture
The system follows a modular pipeline approach:
```
Input Audio → Language Detection (GMM) → Transcription (Whisper) → Translation (Google Translate) → Speech Synthesis (gTTS) → Output Audio
```
### Core Components
1. **Language Detection Module** (`language_detection.py`)
- Pre-trained GMM models with 512 components for 6-language detection
- MFCC feature extraction with delta and delta-delta coefficients
- WebRTC VAD for silence removal
- Achieves 81.09% accuracy on 6 languages, 95% on 4 main languages
2. **Inference Pipeline** (`inference_pipeline.py`)
- Whisper base model for transcription
- Google Translate API integration
- gTTS for speech synthesis
- Audio processing and playback functionality
3. **User Interface**
- **First Screen** (`first_screen.py`): Audio file upload
- **Second Screen** (`second_screen.py`): Language detection and target language selection
- **Third Screen** (`third_screen.py`): Results display with audio playback
## Supported Languages
- **English** (en)
- **French** (fr)
- **Arabic** (ar)
- **Spanish* …