Skip to content

local: null / edge: null in config.yaml crashes STT/TTS with 'NoneType' object has no attribute 'get' #47318

Closed

Description

@Melancbot

When stt.local or tts.edge is set to null in config.yaml (which appears to happen by default on a fresh hermes setup --voice or similar flow), Hermes crashes with AttributeError: 'NoneType' object has no attribute 'get' instead of falling back to defaults.
Steps to reproduce

  1. Fresh install, configure local voice mode (LM Studio + local Whisper STT + Edge TTS)
  2. config.yaml ends up with:

stt:
local: null
tts:
edge: null

  1. Run /voice on, record audio
  2. Get: Transcription failed: Local transcription failed: 'NoneType' object has no attribute 'get'

Root cause
In tools/transcription_tools.py around line 1662:

local_cfg = stt_config.get("local", {})
...
model or local_cfg.get("model", DEFAULT_LOCAL_MODEL)

When local_cfg is explicitly null in YAML (not just missing), .get("local", {}) returns None, not {}, since the key exists with value None. Same likely applies to the tts.edge section for Edge TTS.

Suggested fix
model or (local_cfg or {}).get("model", DEFAULT_LOCAL_MODEL)
Apply the same defensive (x or {}) pattern anywhere a config sub-section is read this way.
Workaround
Manually edit config.yaml to replace local: null / edge: null with an explicit dict, e.g.:
stt:
local:
model: base
tts:
edge:
voice: "en-US-AriaNeural"

Environment

Hermes Agent v0.16.0
Linux Mint 22.2 (Ubuntu 24.04 base)
Local provider: LM Studio
faster-whisper 1.2.1

Activity

  1. Melancbot commented on Jun 16, 2026

    @Melancbot
    Author

    Also worth mentioning in a comment: faster-whisper 1.2.1's transcribe() returns a generator for segments — if any other code path elsewhere reads info before fully consuming segments, it could see similar None/empty results. Not confirmed as a bug, just a heads-up for maintainers.

  2. added
    type/bugSomething isn't working
    P2Medium — degraded but workaround exists
    tool/ttsText-to-speech and transcription
    on Jun 16, 2026
  3. added a commit that references this issue on Jul 10, 2026
    8937121
  4. teknium1 commented on Jul 10, 2026

    @teknium1
    Collaborator

    Fixed in PR #61799, salvaging @x7peeps's #47334 with authorship preserved and widened to every provider subsection read in both voice modules (local/edge/xai/openai/elevenlabs/gemini/mistral/piper/neutts). Note: the recent config-loader null fix (#61733) covers sections that have defaults, but subsections without a DEFAULT_CONFIG entry (e.g. stt.xai:) still arrived as None — hence the consumption-site guards. Thanks for the report!

  5. added a commit that references this issue on Jul 13, 2026
    4c668fa
  6. added a commit that references this issue on Jul 18, 2026
    bf1602e
  7. added a commit that references this issue on Jul 21, 2026
    1ae311f
  8. andrexibiza commented on Aug 4, 2026

    @andrexibiza

    Verified as fixed on current main (70db671fac) by Vox Lockin lane 05 — no new PR needed for the core issue (already closed via #61799). Live probes confirm:

    • stt.local: null / tts.edge: null / tts.kittentts: null (and all other provider subsections) in config.yaml now coalesce to their default dicts through the loader's _deep_merge (None-override of a dict default is ignored), and every consumption site in tools/transcription_tools.py / tools/tts_tool.py uses the (x or {}) guard.
    • TTS generation and STT provider resolution complete without 'NoneType' object has no attribute 'get'.

    One residual site is closed in PR #78202: _generate_kittentts was the last TTS provider subsection read without null-coalescing (tts.kittentts: null → kt_config.get(...) crash if reached with a non-loader config). Now uses the same (x or {}) pattern.

  9. added a commit that references this issue on Aug 7, 2026
    0c60ab8
  10. added a commit that references this issue on Aug 11, 2026
    669191f
  11. added a commit that references this issue on Sep 3, 2026
    658ad8d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existstool/ttsText-to-speech and transcriptiontype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions