Bug Description
After enabling all TTS and STT settings and sending /voice on in a Matrix DM, the agent was not responding with TTS and no errors were shown. After some digging this is what is logged in ~/.hermes/logs/error.log:
2026-03-31 21:02:33,836 ERROR gateway.platforms.matrix: Matrix: upload failed: Request must specify a Content-Length
2026-03-31 21:04:36,839 WARNING nio.responses: Error validating response: 'content_uri' is a required property
Steps to Reproduce
- Enable Matrix and connect (Synapse server), enable STT and TTS.
- Send /voice on
- Send a voice message in a DM to the agent
- Get a text reaction without audio back
- Check ~/.hermes/logs/error.log
Expected Behavior
The agent should send back a response with a voice message attached.
Actual Behavior
Only a text message, no errors. Only when digging deeper.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Operating System
Ubuntu 24.04 LTS
Python Version
3.11.15
Hermes Version
Hermes Agent v0.6.0 (2026.3.30)
Relevant Logs / Traceback
2026-03-31 21:02:33,836 ERROR gateway.platforms.matrix: Matrix: upload failed: Request must specify a Content-Length
2026-03-31 21:04:36,839 WARNING nio.responses: Error validating response: 'content_uri' is a required property
Root Cause Analysis (optional)
Synapse requires Content-Length, and without filesize passed to nio, it wasn't being set.
Proposed Fix (optional)
Added filesize=len(data) to the nio.upload() call. gateway/platforms/matrix.py
Are you willing to submit a PR for this?
Bug Description
After enabling all TTS and STT settings and sending /voice on in a Matrix DM, the agent was not responding with TTS and no errors were shown. After some digging this is what is logged in
~/.hermes/logs/error.log:Steps to Reproduce
Expected Behavior
The agent should send back a response with a voice message attached.
Actual Behavior
Only a text message, no errors. Only when digging deeper.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
No response
Operating System
Ubuntu 24.04 LTS
Python Version
3.11.15
Hermes Version
Hermes Agent v0.6.0 (2026.3.30)
Relevant Logs / Traceback
2026-03-31 21:02:33,836 ERROR gateway.platforms.matrix: Matrix: upload failed: Request must specify a Content-Length 2026-03-31 21:04:36,839 WARNING nio.responses: Error validating response: 'content_uri' is a required propertyRoot Cause Analysis (optional)
Synapse requires Content-Length, and without filesize passed to nio, it wasn't being set.
Proposed Fix (optional)
Added filesize=len(data) to the nio.upload() call. gateway/platforms/matrix.py
Are you willing to submit a PR for this?