Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Pass connector_specs to convert_if_needed for codec restrictions
Murtaza Nasiref3792f13f5c
diff --git a/src/api/recordings.py b/src/api/recordings.pyindex 17327a6e..27744fb6 100644--- a/src/api/recordings.py+++ b/src/api/recordings.py@@ -2049,7 +2049,8 @@ def upload_file():codec_info=codec_info,needs_chunking=needs_chunking_for_processing,is_asr_endpoint=USE_ASR_ENDPOINT,- delete_original=True+ delete_original=True,+ connector_specs=connector_specs # Pass connector specs for codec restrictions)filepath = result.output_pathdiff --git a/src/file_monitor.py b/src/file_monitor.pyindex e943912e..ee7238ed 100644--- a/src/file_monitor.py+++ b/src/file_monitor.py@@ -323,6 +323,17 @@ class FileMonitor:except FFProbeError as e:self.logger.warning(f"Failed to probe {original_filename}: {e}. Will attempt conversion.")+ # Get connector specs for codec restrictions+ connector_specs = None+ try:+ from src.services.transcription import get_registry+ registry = get_registry()+ connector = registry.get_active_connector()+ if connector:+ connector_specs = connector.specifications+ except Exception as e:+ self.logger.warning(f"Could not get connector specs: {e}")+# Convert/compress file if necessary - convert_if_needed handles ALL conversion needstry:result = convert_if_needed(@@ -331,7 +342,8 @@ class FileMonitor:codec_info=codec_info,needs_chunking=False,is_asr_endpoint=False,- delete_original=True # Clean up original after conversion+ delete_original=True, # Clean up original after conversion+ connector_specs=connector_specs # Pass connector specs for codec restrictions)final_path = Path(result.output_path)