Michael Hu commited on
Commit
9ad1c87
·
1 Parent(s): 2418415

feat: remove unused language options and update supported languages list

Browse files
app.py CHANGED
@@ -121,7 +121,7 @@ def get_supported_configurations() -> dict:
121
  fallback_config = {
122
  'asr_models': ['whisper-small', 'parakeet'],
123
  'voices': ['chatterbox'],
124
- 'languages': ['en', 'zh', 'es', 'fr', 'de'],
125
  'audio_formats': ['wav', 'mp3', 'm4a', 'flac', 'ogg'], # Updated to include all supported formats
126
  'max_file_size_mb': 100,
127
  'speed_range': {'min': 0.5, 'max': 2.0}
@@ -235,9 +235,6 @@ def create_interface():
235
  # Language options mapping
236
  language_options = {
237
  "Chinese (Mandarin)": "zh",
238
- "Spanish": "es",
239
- "French": "fr",
240
- "German": "de",
241
  "English": "en"
242
  }
243
 
@@ -265,7 +262,6 @@ def create_interface():
265
  gr.Audio(
266
  label="Upload Audio File",
267
  type="filepath",
268
- file_types=[".wav", ".mp3", ".m4a", ".flac", ".ogg"],
269
  # Accept both file extensions and MIME types
270
  # This explicitly allows mp3 files to pass Gradio's frontend validation
271
  ),
 
121
  fallback_config = {
122
  'asr_models': ['whisper-small', 'parakeet'],
123
  'voices': ['chatterbox'],
124
+ 'languages': ['en', 'zh'],
125
  'audio_formats': ['wav', 'mp3', 'm4a', 'flac', 'ogg'], # Updated to include all supported formats
126
  'max_file_size_mb': 100,
127
  'speed_range': {'min': 0.5, 'max': 2.0}
 
235
  # Language options mapping
236
  language_options = {
237
  "Chinese (Mandarin)": "zh",
 
 
 
238
  "English": "en"
239
  }
240
 
 
262
  gr.Audio(
263
  label="Upload Audio File",
264
  type="filepath",
 
265
  # Accept both file extensions and MIME types
266
  # This explicitly allows mp3 files to pass Gradio's frontend validation
267
  ),
src/application/services/audio_processing_service.py CHANGED
@@ -636,10 +636,7 @@ class AudioProcessingApplicationService:
636
  return {
637
  'asr_models': ['parakeet', 'whisper-small', 'whisper-medium', 'whisper-large'],
638
  'voices': ['chatterbox'],
639
- 'languages': [
640
- 'en', 'es', 'fr', 'de', 'it', 'pt', 'ru', 'ja', 'ko', 'zh',
641
- 'ar', 'hi', 'tr', 'pl', 'nl', 'sv', 'da', 'no', 'fi'
642
- ],
643
  'audio_formats': self._config.get_processing_config()['supported_audio_formats'],
644
  'max_file_size_mb': self._config.get_processing_config()['max_file_size_mb'],
645
  'speed_range': {'min': 0.5, 'max': 2.0}
 
636
  return {
637
  'asr_models': ['parakeet', 'whisper-small', 'whisper-medium', 'whisper-large'],
638
  'voices': ['chatterbox'],
639
+ 'languages': ['en', 'zh'],
 
 
 
640
  'audio_formats': self._config.get_processing_config()['supported_audio_formats'],
641
  'max_file_size_mb': self._config.get_processing_config()['max_file_size_mb'],
642
  'speed_range': {'min': 0.5, 'max': 2.0}