#2563·DocsGPT

fix: STT_ENABLE_DIARIZATION setting is wired through but silently discarded in both STT providers

Author: immuhammadfurqanCreated Jun 24, 2026Updated Jun 29, 2026

Bug Description

application/core/settings.py exposes STT_ENABLE_DIARIZATION: bool = False and it is correctly passed through the call chain — attachments/routes.py:314 and audio_parser.py:29 both pass diarize=settings.STT_ENABLE_DIARIZATION to stt.transcribe(). The BaseSTT abstract method also declares the parameter.

However both concrete implementations silently discard it:

python
# openai_stt.py:29  AND  faster_whisper_stt.py:42
_ = diarize   # no-op

Users who set STT_ENABLE_DIARIZATION=true receive no diarization and no error or warning.

Expected Behavior

When diarize=True is passed but the provider does not support it, a logger.warning() should be emitted so operators know the configuration has no effect.

Proposed Fix

Replace _ = diarize in both providers with a conditional logger.warning() block.