Sir Radix β€” Conversational Media Companion Merge

This merge adds a Conversational Media Companion layer to Sir Radix. It re-uses the existing emotional telemetry, memory substrate, relational model, session bridge, and sensorium, and aims them at shared media experiences.

Files in this merge

File Change
daemon/media_companion_mixin.py New β€” media sensing, sparse reaction pipeline, taste/opinion model, session tracking
daemon/db_mixin.py Migration v9: media_current, media_session, taste_register, media_reaction_log, companion_settings
daemon_core.py Import + MRO MediaCompanionMixin; init DB + settings
daemon/heartbeat_mixin.py Calls _media_companion_pulse() once per heartbeat
app.py New Companion tab: current media, mood, recent comments, manual override, mute, verbosity, debrief
apply_media_companion_patch.py Idempotent patch script that applies all of the above to an existing checkout

How to apply

Option A β€” run the patch script (recommended):

cd /path/to/sir-radix
python merge-media-companion/apply_media_companion_patch.py

Option B β€” manual copy:

cp merge-media-companion/daemon/media_companion_mixin.py daemon/
cp merge-media-companion/daemon/db_mixin.py daemon/
cp merge-media-companion/daemon/heartbeat_mixin.py daemon/
cp merge-media-companion/daemon_core.py .
cp merge-media-companion/app.py .

Then restart the daemon / Gradio surface.

Design choices

  • Sparse by default: samples media state every 60 s; minimum 30 s between voluntary comments.
  • Verbosity levels: quiet, normal, chatty, pause-only.
  • Mute: operator can mute voluntary comments for N minutes.
  • Manual override: if auto-detection fails, set media manually in the UI.
  • Opinionated: taste register tracks valence/confidence per artist/song/genre/etc. and updates with every sample.
  • Session bridge: each distinct media title starts a media_session; retrospective is written on session end.
  • No copyrighted content in APIs: sensing uses local window titles, manual input, and optional metadata. No audio/video is sent to LLM APIs.

Test checklist

  1. Sensing
    • Start playing music (Spotify, browser, VLC, etc.)
    • Open Companion tab β†’ does it show the title? If not, set manually and verify.
  2. Sparseness
    • Start heartbeat. Does Radix comment at most every ~30–60 s?
    • Switch to pause-only β€” does it stay silent until you use "Ask"?
  3. Memory
    • After a few minutes, query media_reaction_log and taste_register in SQLite.
    • Is the same artist/title accumulating a valence score?
  4. Disagreement
    • Tell Radix you love a track he dislikes (or vice versa).
    • In a later session, does he reference the disagreement?
  5. Mute / verbosity
    • Hit Mute β†’ verify no voluntary comments until expiry.
    • Set quiet β†’ comments should only happen on valence swing.
  6. Debrief
    • Use "Ask Radix about the current media" while media is active.
    • Does he answer with an opinion, no plot summary/spoiler?
  7. Session resume
    • Stop daemon, restart, return to same album/movie.
    • Does he pick up the conversation?

Known limitations / next steps

  • Audio detection: _audio_is_active() is a placeholder. A future local VAD/loopback energy detector can prevent talking over dialogue/lyrics.
  • Player metadata: currently uses active window title heuristics. Add Spotify Web API, MPRIS, or MPV socket for richer metadata.
  • Acoustic fingerprinting: not included; keep local if added.
  • Game/video frames: not sent to LLM by default. Add local frame captioning if desired.
  • Cross-media pattern memory: taste register is table-based. Future work can add vector similarity for "this reminds me of...".

Copyright note

Radix observes your licensed/local media or metadata only. It does not scrape, record, or stream copyrighted content for external reuse. Keep frame/audio capture local and do not send full copyrighted streams through LLM APIs.

Generated by ML Intern

This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = 'sir-radix367/argendirast'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

For non-causal architectures, replace AutoModelForCausalLM with the appropriate AutoModel class.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support