Memory 019eae58

Memory ID (Session ID): 019eae58-f724-7000-9d8d-5653aab48d87
Last Updated: 2026-06-10 00:40:44

Fact Summary

  • ElevenLabsAdapter DI Constraint: In /home/dev/active/[[projects/storymatrix|StoryMatrix]]/src/[[projects/storymatrix|StoryMatrix]]/infrastructure/container.py, ElevenLabsAdapter (and elevenlabs_tts_adapter) MUST be passed the root config=config object, not the config.providers.elevenlabs sub-config. The adapter handles sub-config extraction internally to access root-level flags like dev_local_only.
  • Async Stream Handling: In elevenlabs.py (synthesize_with_stitching), always use async with for asynchronous context managers and ensure await self._collect_stream(response.data) is used when processing streaming responses.
  • Float Zero Falsiness Bug: In audio_discovery_service.py, when handling timestamps or durations, NEVER use truthy or chains (e.g., val or default) because 0.0 is a valid duration. Always use explicit is not None checks.
  • DRY Config Access: Use the extract_tts_provider() helper in config_accessor.py for reading TTS configuration. Do not duplicate provider extraction logic in components like character_mapping_stage.py or generate_story.py.
  • Python Versioning: StoryMatrix strictly targets Python 3.11+. Ensure /home/dev/active/[[projects/storymatrix|StoryMatrix]]/pyproject.toml has target-version="py311" for Ruff and python_version="3.11" for mypy.
  • SFX Observability: When classifying SFX, ensure fallback logic handles ties properly (defaults to impact_sfx) and emit warnings for unrecognized subtypes.

Reference Session