Skip to content

fix(photon): preserve outbound voice attachment identity - #91369

Open
mooserini wants to merge 2 commits into
NousResearch:mainfrom
mooserini:fix/photon-voice-identity-main
Open

fix(photon): preserve outbound voice attachment identity#91369
mooserini wants to merge 2 commits into
NousResearch:mainfrom
mooserini:fix/photon-voice-identity-main

Conversation

@mooserini

Copy link
Copy Markdown

Summary

  • Ship the outbound voice preparation needed by Photon/Spectrum 8.
  • Materialize every outbound voice reply as a unique AAC/M4A file with matching audio/mp4 metadata and filename.
  • Add source/upload identity logging and cleanup around the sidecar send path.
  • Add real sidecar/Spectrum-boundary regression coverage so inbound CAF bytes cannot be reused as the outbound TTS attachment.

Related: #91129

Root cause

Hermes generated a distinct TTS MP3 and correctly extracted that MEDIA: path, but Spectrum 8's voice() path converted the bytes to M4A while preserving the source tts_*.mp3 upload identity. Photon/iMessage could then resolve the native audio message back onto the conversation's original inbound CAF voice memo.

This change creates a fresh voice-<UUID>.m4a object before calling voice(), with matching bytes, filename, and MIME metadata.

Verification

  • node --check plugins/platforms/photon/sidecar/index.mjs plugins/platforms/photon/sidecar/voice-send.mjs
  • pytest tests/test_photon_voice_dependencies.py tests/plugins/platforms/photon/test_sidecar_voice_runtime.py tests/plugins/platforms/photon/test_outbound_media.py tests/gateway/test_tts_media_routing.py -q — 19 passed
  • pytest tests/plugins/platforms/photon -q — 134 passed
  • npm ls --depth=0spectrum-ts@8.0.0, ffmpeg-static@5.3.0
  • Manual Photon validation after gateway restart confirmed that the generated reply was received as Ara's voice rather than the inbound voice note.

@mooserini
mooserini requested a review from a team August 21, 2026 07:23
@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins tool/tts Text-to-speech and transcription P3 Low — cosmetic, nice to have labels Aug 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: #91129 and #65322 cover the complementary CAF recognition/dependency and outbound conversion/threading paths. This PR specifically separates the generated outbound voice attachment identity after conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/tts Text-to-speech and transcription type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants