Merge pull request #1394 from NousResearch/hermes/hermes-eca4a640

fix: honor stt.enabled false across gateway transcription
This commit is contained in:
Teknium 2026-03-14 22:11:47 -07:00 committed by GitHub
commit 84d99f7754
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 133 additions and 6 deletions

View file

@ -3550,7 +3550,7 @@ class GatewayRunner:
audio_paths: List[str],
) -> str:
"""
Auto-transcribe user voice/audio messages using OpenAI Whisper API
Auto-transcribe user voice/audio messages using the configured STT provider
and prepend the transcript to the message text.
Args:
@ -3560,6 +3560,12 @@ class GatewayRunner:
Returns:
The enriched message string with transcriptions prepended.
"""
if not getattr(self.config, "stt_enabled", True):
disabled_note = "[The user sent voice message(s), but transcription is disabled in config.]"
if user_text:
return f"{disabled_note}\n\n{user_text}"
return disabled_note
from tools.transcription_tools import transcribe_audio, get_stt_model_from_config
import asyncio