hermes - ✅(Solved) Fix `[Bug]: Slack — TTS voice reply never sent after voice input (_should_send_voice_reply always returns False)` [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root Cause

PR fix notes

PR #13329: fix(slack): allow voice replies after voice input

Description (problem / solution / changelog)

Fixes #13126.

Root cause: The runner skipped automatic voice replies for every voice input because Telegram and Discord adapters can already handle native voice playback. Slack does not have that same adapter-side voice reply path, so Slack voice inputs never produced the configured TTS voice response.

Fix summary:

  • Keep the voice-input dedupe skip for Telegram and Discord only.
  • Let Slack continue through the runner voice-reply path.
  • Add Slack-specific regression cases for all and voice_only voice modes.

Tests:

  • uv run --frozen --python 3.11 --extra dev pytest -o addopts= tests/gateway/test_voice_command.py -k 'TestAutoVoiceReply or TestHandleVoiceCommand' -q
  • git diff --check -- gateway/run.py tests/gateway/test_voice_command.py

Changed files

  • gateway/run.py (modified, +9/-6)
  • tests/gateway/test_voice_command.py (modified, +23/-6)

Code Example

## Problem                                                                                                                                                 
                                                                                                                                                              
   When a user sends a voice message to the Slack gateway, Hermes correctly transcribes it (via faster-whisper) but never sends a TTS voice reply back —      
   even with `voice_mode` set to `all` or `voice_only`.                                                                                                       
                                                                                                                                                              
   ## Root Cause                                                                                                                                              
                                                                                                                                                              
   In `gateway/run.py`, `_should_send_voice_reply()` contains this guard (around line 6117):

---

The comment says "base adapter auto-TTS already handles voice input". This is true for Telegram and Discord (which have `_auto_tts_disabled_chats` and     
   handle auto-TTS in the base adapter). However, the Slack adapter has NO `_auto_tts_disabled_chats` attribute and does NOT handle auto-TTS itself — so      
   the runner drops the TTS reply and nothing is sent.                                                                                                        
                                                                                                                                                              
   The Slack adapter does have a working `send_voice()` implementation. The issue is purely in the runner logic.                                              
                                                                                                                                                              
   ## Fix                                                                                                                                                     
                                                                                                                                                              
   Check whether the adapter actually handles auto-TTS before skipping:

---

## Steps to Reproduce                                                                                                                                      
                                                                                                                                                              
   1. Configure Slack gateway with a valid bot token and `files:read` + `files:write` scopes                                                                  
   2. Set `voice_mode` to `all` or `voice_only` via `gateway_voice_mode.json`                                                                                 
   3. Send a voice message to the Hermes bot in Slack DM                                                                                                      
   4. Bot transcribes correctly and sends text reply — but no TTS audio reply                                                                                 
                                                                                                                                                              
   ## Expected Behavior                                                                                                                                       
                                                                                                                                                              
   Bot sends a TTS voice reply (audio file) back to Slack after transcribing and responding.                                                                  
                                                                                                                                                              
   ## Environment                                                                                                                                             
                                                                                                                                                              
   - Hermes v0.10.0                                                                                                                                           
   - Platform: Slack (Socket Mode)                                                                                                                            
   - STT: faster-whisper (local, base model)                                                                                                                  
   - TTS: edge-tts (nb-NO-PernilleNeural)                                                                                                                     
   - macOS (Mac Mini M4)                                                                                                                                      
                                                                                                                                                              
   ## Related                                                                                                                                                 
                                                                                                                                                              
   Similar root cause to #9236 (WhatsApp missing send_voice override) — different adapter, different missing piece.
RAW_BUFFERClick to expand / collapse

Body:

## Problem                                                                                                                                                 
                                                                                                                                                           
When a user sends a voice message to the Slack gateway, Hermes correctly transcribes it (via faster-whisper) but never sends a TTS voice reply back —      
even with `voice_mode` set to `all` or `voice_only`.                                                                                                       
                                                                                                                                                           
## Root Cause                                                                                                                                              
                                                                                                                                                           
In `gateway/run.py`, `_should_send_voice_reply()` contains this guard (around line 6117):                                                                  
                                                                                                                                                           
```python                                                                                                                                                  
if is_voice_input and not already_sent:                                                                                                                    
    return False

The comment says "base adapter auto-TTS already handles voice input". This is true for Telegram and Discord (which have _auto_tts_disabled_chats and
handle auto-TTS in the base adapter). However, the Slack adapter has NO _auto_tts_disabled_chats attribute and does NOT handle auto-TTS itself — so
the runner drops the TTS reply and nothing is sent.

The Slack adapter does have a working send_voice() implementation. The issue is purely in the runner logic.

Fix

Check whether the adapter actually handles auto-TTS before skipping:

adapter = self.adapters.get(event.source.platform)                                                                                                         
adapter_handles_auto_tts = hasattr(adapter, "_auto_tts_disabled_chats")                                                                                    
if is_voice_input and not already_sent and adapter_handles_auto_tts:                                                                                       
    return False

Steps to Reproduce

  1. Configure Slack gateway with a valid bot token and files:read + files:write scopes
  2. Set voice_mode to all or voice_only via gateway_voice_mode.json
  3. Send a voice message to the Hermes bot in Slack DM
  4. Bot transcribes correctly and sends text reply — but no TTS audio reply

Expected Behavior

Bot sends a TTS voice reply (audio file) back to Slack after transcribing and responding.

Environment

  • Hermes v0.10.0
  • Platform: Slack (Socket Mode)
  • STT: faster-whisper (local, base model)
  • TTS: edge-tts (nb-NO-PernilleNeural)
  • macOS (Mac Mini M4)

Related

Similar root cause to #9236 (WhatsApp missing send_voice override) — different adapter, different missing piece.

extent analysis

TL;DR

The most likely fix is to update the _should_send_voice_reply() function in gateway/run.py to check if the adapter handles auto-TTS before skipping the TTS reply.

Guidance

  • The issue is caused by the Slack adapter not handling auto-TTS, but the runner logic assumes it does. To fix this, we need to update the _should_send_voice_reply() function to check if the adapter has an _auto_tts_disabled_chats attribute.
  • We can verify this fix by checking if the TTS reply is sent correctly after updating the function.
  • The updated function should check if the adapter handles auto-TTS before skipping the TTS reply, as shown in the provided code snippet.
  • We should also test the fix with different voice_mode settings to ensure it works as expected.

Example

adapter = self.adapters.get(event.source.platform)
adapter_handles_auto_tts = hasattr(adapter, "_auto_tts_disabled_chats")
if is_voice_input and not already_sent and adapter_handles_auto_tts:
    return False

Notes

This fix assumes that the Slack adapter has a working send_voice() implementation, as mentioned in the issue. If this is not the case, additional changes may be needed.

Recommendation

Apply the workaround by updating the _should_send_voice_reply() function as described above. This fix should resolve the issue without requiring any version upgrades.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING