Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
Forward request.model as ?model= query param on asr_endpoint connector for WhisperX runtime model switching
Murtaza Nasir206e04302075
diff --git a/docs/admin-guide/model-configuration.md b/docs/admin-guide/model-configuration.mdindex 62c190c3..cd236193 100644--- a/docs/admin-guide/model-configuration.md+++ b/docs/admin-guide/model-configuration.md@@ -412,7 +412,7 @@ Resolution order at upload time:If the override isn't in `TRANSCRIPTION_MODELS_AVAILABLE`, it's silently dropped and Speakr falls back to the global default — useful as a safety net against stale browser caches sending old model ids.-The override is propagated to the connector via the `model` field on `TranscriptionRequest`. Connectors that key on a model name (OpenAI Whisper / Transcribe, Mistral, VibeVoice) honour it directly. The `asr_endpoint` connector ignores it — its model is configured server-side on the WhisperX/whisper-asr-webservice container.+The override is propagated to the connector via the `model` field on `TranscriptionRequest`. Connectors that key on a model name (OpenAI Whisper / Transcribe, Mistral, VibeVoice) honour it directly. The `asr_endpoint` connector forwards the override as a `model=` query parameter; the [whisperx-asr-service](https://github.com/murtaza-nasir/whisperx-asr-service) fork uses it to switch the loaded Whisper model on demand, while the upstream `ahmetoner/whisper-asr-webservice` ignores unknown query parameters, so the override is safe in either case.## Configurable Embedding Modeldiff --git a/src/services/transcription/connectors/asr_endpoint.py b/src/services/transcription/connectors/asr_endpoint.pyindex d3f9266f..d9432453 100644--- a/src/services/transcription/connectors/asr_endpoint.py+++ b/src/services/transcription/connectors/asr_endpoint.py@@ -162,6 +162,15 @@ class ASREndpointConnector(BaseTranscriptionConnector):if request.hotwords:params['hotwords'] = request.hotwords+ # Per-request model override (issue #266). The whisperx-asr-service+ # fork accepts a `model` query parameter (e.g. large-v3,+ # distil-medium.en) and switches the loaded Whisper model+ # on demand. The upstream onerahmet/whisper-asr-webservice+ # ignores unknown params, so this is safe in both cases.+ if request.model:+ params['model'] = request.model+ logger.info(f"Using per-request model override: {request.model}")+content_type = request.mime_type or 'application/octet-stream'files = {'audio_file': (request.filename, request.audio_file, content_type)