Benjamin14 commited on
Commit
bb751d6
·
1 Parent(s): 84def65

Translate README to English for international accessibility

Browse files
Files changed (1) hide show
  1. README.md +67 -67
README.md CHANGED
@@ -14,45 +14,45 @@ disable_embedding: false
14
 
15
  # 🎙️ Speech-to-Speech Translator
16
 
17
- Application Gradio moderne pour la traduction audio en temps réel, compatible avec Hugging Face Spaces (Zero GPU).
18
 
19
- ## ✨ Fonctionnalités
20
 
21
- - 🎵 **Enregistrement Audio** : Interface intuitive pour enregistrer jusqu'à 30 secondes
22
- - 🎙️ **Transcription Automatique** : STT (Speech-to-Text) avec modèle Whisper optimisé
23
- - 🌍 **Traduction en Temps Réel** : FrançaisAnglais avec Helsinki-NLP
24
- - 🔊 **Synthèse Vocale** : TTS (Text-to-Speech) avec gTTS et détection automatique de langue
25
- - 🚀 **Zero GPU Compatible** : Optimisé pour Hugging Face Spaces avec GPU à la demande
26
- - 🎨 **Interface Moderne** : Design responsive avec CSS personnalisé et animations
27
- - ⚡ **Gestion Intelligente** : Détection automatique de l'environnement (local/cloud)
28
- - 🔧 **Configuration Automatique** : Ports et paramètres adaptés selon le déploiement
29
 
30
- ## 🚀 Utilisation
31
 
32
- ### Interface Web (Gradio)
33
 
34
- 1. **Enregistrer l'Audio** : Cliquez sur "Record" et parlez dans votre microphone (max 30 secondes)
35
- 2. **Configurer les Langues** : Sélectionnez la langue source (fr/en) et cible (en/fr)
36
- 3. **Traiter l'Audio** : Cliquez sur "🚀 Process Audio"
37
- 4. **Consulter les Résultats** :
38
- - **Onglet "🔊 Generated Audio"** : Audio traduit généré
39
- - **Onglet "🎙️ Transcription"** : Texte transcrit
40
- - **Onglet "🌍 Translation"** : Texte traduit
41
 
42
- ### Flux de Traitement
43
 
44
  ```
45
  Audio Input → STT (Whisper) → Translation (Helsinki-NLP) → TTS (gTTS) → Audio Output
46
  ↓ ↓ ↓ ↓
47
- Enregistré Transcrit Traduit Audio Généré
48
  ```
49
 
50
- ### Fonctionnalités Avancées
51
 
52
- - **Limitation Automatique** : Les enregistrements > 30s sont automatiquement tronqués
53
- - **Détection de Langue** : Le TTS détecte automatiquement la langue du texte traduit
54
- - **Interface Responsive** : Design adaptatif avec animations et transitions fluides
55
- - **Gestion d'Erreurs** : Messages de statut en temps réel avec codes couleur
56
 
57
  ## 🛠️ Installation
58
 
@@ -107,32 +107,32 @@ TradLiveHug/
107
 
108
  The `requirements.txt` file contains all necessary dependencies for automatic deployment.
109
 
110
- ## 🎯 Fonctionnalités Techniques
111
 
112
  ### STT (Speech-to-Text)
113
- - **Modèle** : OpenAI Whisper Small (openai/whisper-small)
114
- - **Optimisation** : CPU/GPU adaptatif selon l'environnement
115
- - **Langues** : Support français et anglais avec détection automatique
116
- - **Limitation** : Troncature automatique à 30 secondes
117
- - **Performance** : Optimisé pour Zero GPU de Hugging Face Spaces
118
-
119
- ### Traduction
120
- - **Modèles** : Helsinki-NLP Opus-MT (fr-en et en-fr)
121
- - **Support** : FrançaisAnglais bidirectionnel
122
- - **Nettoyage** : Suppression automatique des préfixes de traduction
123
- - **Performance** : Chargement intelligent des modèles
124
 
125
  ### TTS (Text-to-Speech)
126
- - **Moteur** : gTTS (Google Text-to-Speech) pour tous les environnements
127
- - **Détection** : Langue automatique basée sur le contenu du texte
128
- - **Qualité** : Voix naturelles pour français et anglais
129
- - **Format** : MP3 optimisé pour la diffusion web
130
 
131
  ### Architecture
132
- - **Zero GPU** : Support complet avec décorateur `@spaces.GPU`
133
- - **Environnement** : Détection automatique local vs Hugging Face Spaces
134
- - **Interface** : Gradio avec CSS personnalisé et design moderne
135
- - **Gestion d'erreurs** : Système robuste avec messages de statut
136
 
137
  ## 🔍 Usage Examples
138
 
@@ -155,37 +155,37 @@ Translation: "Je suis heureux de vous rencontrer"
155
  Audio: [French audio file]
156
  ```
157
 
158
- ## 🐛 Dépannage
159
 
160
- ### Problèmes Courants
161
 
162
- - **"Models not loaded"** : Attendez le chargement initial (1-2 minutes)
163
- - **"No transcription"** : Vérifiez la qualité audio et le volume
164
- - **"TTS Error"** : Vérifiez la connexion internet pour gTTS
165
- - **"Audio too long"** : L'audio est automatiquement tronqué à 30 secondes
166
- - **"Processing error"** : Vérifiez les logs pour plus de détails
167
 
168
  ### Performance
169
 
170
- - **Premier lancement** : 1-2 minutes (téléchargement des modèles)
171
- - **Traitement audio** : 5-15 secondes selon la durée
172
- - **Mémoire** : ~2-3 GB RAM requis
173
- - **GPU** : Utilisation automatique si disponible (Zero GPU sur HF Spaces)
174
 
175
- ### Configuration Environnement
176
 
177
- - **Local** : Détection automatique GPU/CPU, port libre automatique
178
- - **Hugging Face Spaces** : Configuration Zero GPU automatique
179
- - **Déploiement** : Ports et paramètres adaptés automatiquement
180
 
181
  ## 📝 Notes
182
 
183
- - **Zero GPU** : Compatible avec Hugging Face Spaces Zero GPU
184
- - **Optimisation** : CPU/GPU adaptatif selon l'environnement
185
- - **Interface** : Design moderne avec CSS personnalisé et animations
186
- - **Formats** : Support WAV, MP3 et autres formats audio courants
187
- - **Limitation** : Audio automatiquement tronqué à 30 secondes
188
- - **Déploiement** : Configuration automatique pour local et cloud
189
 
190
  ## 📄 License
191
 
 
14
 
15
  # 🎙️ Speech-to-Speech Translator
16
 
17
+ Modern Gradio application for real-time audio translation, compatible with Hugging Face Spaces (Zero GPU).
18
 
19
+ ## ✨ Features
20
 
21
+ - 🎵 **Audio Recording** : Intuitive interface to record up to 30 seconds
22
+ - 🎙️ **Automatic Transcription** : STT (Speech-to-Text) with optimized Whisper model
23
+ - 🌍 **Real-time Translation** : FrenchEnglish with Helsinki-NLP
24
+ - 🔊 **Speech Synthesis** : TTS (Text-to-Speech) with gTTS and automatic language detection
25
+ - 🚀 **Zero GPU Compatible** : Optimized for Hugging Face Spaces with on-demand GPU
26
+ - 🎨 **Modern Interface** : Responsive design with custom CSS and animations
27
+ - ⚡ **Smart Management** : Automatic environment detection (local/cloud)
28
+ - 🔧 **Auto Configuration** : Ports and parameters adapted according to deployment
29
 
30
+ ## 🚀 Usage
31
 
32
+ ### Web Interface (Gradio)
33
 
34
+ 1. **Record Audio** : Click "Record" and speak into your microphone (max 30 seconds)
35
+ 2. **Configure Languages** : Select source (fr/en) and target (en/fr) languages
36
+ 3. **Process Audio** : Click "🚀 Process Audio"
37
+ 4. **View Results** :
38
+ - **"🔊 Generated Audio" Tab** : Generated translated audio
39
+ - **"🎙️ Transcription" Tab** : Transcribed text
40
+ - **"🌍 Translation" Tab** : Translated text
41
 
42
+ ### Processing Flow
43
 
44
  ```
45
  Audio Input → STT (Whisper) → Translation (Helsinki-NLP) → TTS (gTTS) → Audio Output
46
  ↓ ↓ ↓ ↓
47
+ Recorded Transcribed Translated Generated Audio
48
  ```
49
 
50
+ ### Advanced Features
51
 
52
+ - **Automatic Limitation** : Recordings > 30s are automatically truncated
53
+ - **Language Detection** : TTS automatically detects the language of translated text
54
+ - **Responsive Interface** : Adaptive design with smooth animations and transitions
55
+ - **Error Management** : Real-time status messages with color codes
56
 
57
  ## 🛠️ Installation
58
 
 
107
 
108
  The `requirements.txt` file contains all necessary dependencies for automatic deployment.
109
 
110
+ ## 🎯 Technical Features
111
 
112
  ### STT (Speech-to-Text)
113
+ - **Model** : OpenAI Whisper Small (openai/whisper-small)
114
+ - **Optimization** : Adaptive CPU/GPU according to environment
115
+ - **Languages** : French and English support with automatic detection
116
+ - **Limitation** : Automatic truncation to 30 seconds
117
+ - **Performance** : Optimized for Hugging Face Spaces Zero GPU
118
+
119
+ ### Translation
120
+ - **Models** : Helsinki-NLP Opus-MT (fr-en and en-fr)
121
+ - **Support** : Bidirectional French English
122
+ - **Cleaning** : Automatic removal of translation prefixes
123
+ - **Performance** : Smart model loading
124
 
125
  ### TTS (Text-to-Speech)
126
+ - **Engine** : gTTS (Google Text-to-Speech) for all environments
127
+ - **Detection** : Automatic language based on text content
128
+ - **Quality** : Natural voices for French and English
129
+ - **Format** : MP3 optimized for web streaming
130
 
131
  ### Architecture
132
+ - **Zero GPU** : Full support with `@spaces.GPU` decorator
133
+ - **Environment** : Automatic detection local vs Hugging Face Spaces
134
+ - **Interface** : Gradio with custom CSS and modern design
135
+ - **Error Handling** : Robust system with status messages
136
 
137
  ## 🔍 Usage Examples
138
 
 
155
  Audio: [French audio file]
156
  ```
157
 
158
+ ## 🐛 Troubleshooting
159
 
160
+ ### Common Issues
161
 
162
+ - **"Models not loaded"** : Wait for initial loading (1-2 minutes)
163
+ - **"No transcription"** : Check audio quality and volume
164
+ - **"TTS Error"** : Check internet connection for gTTS
165
+ - **"Audio too long"** : Audio is automatically truncated to 30 seconds
166
+ - **"Processing error"** : Check logs for more details
167
 
168
  ### Performance
169
 
170
+ - **First launch** : 1-2 minutes (model download)
171
+ - **Audio processing** : 5-15 seconds depending on duration
172
+ - **Memory** : ~2-3 GB RAM required
173
+ - **GPU** : Automatic usage if available (Zero GPU on HF Spaces)
174
 
175
+ ### Environment Configuration
176
 
177
+ - **Local** : Automatic GPU/CPU detection, automatic free port
178
+ - **Hugging Face Spaces** : Automatic Zero GPU configuration
179
+ - **Deployment** : Ports and parameters automatically adapted
180
 
181
  ## 📝 Notes
182
 
183
+ - **Zero GPU** : Compatible with Hugging Face Spaces Zero GPU
184
+ - **Optimization** : Adaptive CPU/GPU according to environment
185
+ - **Interface** : Modern design with custom CSS and animations
186
+ - **Formats** : Support for WAV, MP3 and other common audio formats
187
+ - **Limitation** : Audio automatically truncated to 30 seconds
188
+ - **Deployment** : Automatic configuration for local and cloud
189
 
190
  ## 📄 License
191