Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Add additional audio/video formats to backend conversion lists
Murtaza Nasir8f90068844c5
diff --git a/src/api/recordings.py b/src/api/recordings.pyindex 499aebf0..9ebc3ef3 100644--- a/src/api/recordings.py+++ b/src/api/recordings.py@@ -1945,11 +1945,11 @@ def upload_file():if needs_chunking_for_processing:# For chunking: only support formats that work well with chunkingsupported_formats = ('.wav', '.mp3', '.flac')- convertible_formats = ('.amr', '.3gp', '.3gpp', '.m4a', '.aac', '.ogg', '.wma', '.webm')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.m4a', '.aac', '.ogg', '.wma', '.webm', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts')else:# For direct transcription: support WebM and other formats directlysupported_formats = ('.wav', '.mp3', '.flac', '.webm', '.m4a', '.aac', '.ogg')- convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts')# Special handling for problematic AAC files when using ASR endpointis_problematic_aac = (USE_ASR_ENDPOINT anddiff --git a/src/file_monitor.py b/src/file_monitor.pyindex ac67f2ae..36f1eaac 100644--- a/src/file_monitor.py+++ b/src/file_monitor.py@@ -368,7 +368,7 @@ class FileMonitor:# Support WebM and other formats directly when possiblesupported_formats = ('.wav', '.mp3', '.flac', '.webm', '.m4a', '.aac', '.ogg')- convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts')if filename_lower.endswith(supported_formats):self.logger.info(f"File format {filename_lower} is supported, no conversion needed")