Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Add comprehensive video format support
Murtaza Nasir35214155c9bc
diff --git a/src/api/recordings.py b/src/api/recordings.pyindex 9ebc3ef3..9d269290 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', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.m4a', '.aac', '.ogg', '.wma', '.webm', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts', '.mkv', '.avi', '.m4v', '.wmv', '.flv', '.mpeg', '.mpg', '.ogv', '.vob', '.asf')else:# For direct transcription: support WebM and other formats directlysupported_formats = ('.wav', '.mp3', '.flac', '.webm', '.m4a', '.aac', '.ogg')- convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts', '.mkv', '.avi', '.m4v', '.wmv', '.flv', '.mpeg', '.mpg', '.ogv', '.vob', '.asf')# 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 36f1eaac..2830b7ec 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', '.opus', '.caf', '.aiff', '.ts', '.mts')+ convertible_formats = ('.amr', '.3gp', '.3gpp', '.wma', '.mp4', '.mov', '.opus', '.caf', '.aiff', '.ts', '.mts', '.mkv', '.avi', '.m4v', '.wmv', '.flv', '.mpeg', '.mpg', '.ogv', '.vob', '.asf')if filename_lower.endswith(supported_formats):self.logger.info(f"File format {filename_lower} is supported, no conversion needed")diff --git a/templates/components/upload-view.html b/templates/components/upload-view.htmlindex cdc432db..0a524f63 100644--- a/templates/components/upload-view.html+++ b/templates/components/upload-view.html@@ -17,7 +17,7 @@<p class="text-sm text-[var(--text-secondary)] mb-1" v-text="t('upload.dropzone')"></p><p class="text-xs text-[var(--text-muted)]" v-text="t('upload.supportedFormats')"></p></div>- <input ref="fileInput" type="file" @change="handleFileSelect" accept="audio/*,video/*,.mp3,.m4a,.wav,.aac,.ogg,.flac,.wma,.aiff,.opus,.caf,.3gp,.3gpp,.amr,.mp4,.mov,.webm,.mkv,.avi,.m4v,.ts,.mts" multiple class="hidden">+ <input ref="fileInput" type="file" @change="handleFileSelect" accept="audio/*,video/*,.mp3,.m4a,.wav,.aac,.ogg,.flac,.wma,.aiff,.opus,.caf,.3gp,.3gpp,.amr,.mp4,.mov,.webm,.mkv,.avi,.m4v,.ts,.mts,.wmv,.flv,.mpeg,.mpg,.ogv,.vob,.asf" multiple class="hidden"><!-- Queued Files Display --><div v-if="pendingQueueFiles.length > 0" class="mt-3">