fix(photon): recognize opaque CAF voice notes and declare transcoder - #91129
fix(photon): recognize opaque CAF voice notes and declare transcoder#91129mooserini wants to merge 3 commits into
Conversation
|
Review request + fork-CI note. This is the safe, self-contained first step of a 3-PR voice/Photon sequence: What lands here, running cleanly on the pinned spectrum-ts@8.0.0 stack:
Verification (in PR body): Note: this is a fork PR, so workflows don't run until a maintainer clicks "Approve and run workflows" on the first run. @teknium1 @shannonsands — could you review and trigger the CI run? Landing this first unblocks inbound voice notes immediately and clears the path for #91215. |
The magic-byte probe is the robust part of this fix: live Spectrum events genuinely do deliver iMessage voice notes as Two coordination items:
|
|
Addressed the JS-suite point in fb772e1. The direct Verified locally: targeted Vitest, full |
Summary
caffsignature when Spectrum supplies opaque attachment metadataMessageType.VOICE+audio/x-caf, allowing/voice onto enter the auto-TTS pathffmpeg-staticas a direct Photon sidecar dependency so Spectrum can transcode non-M4A TTS output when the media transport is functionalReproduction
Opaque inbound CAF
/voice on.application/octet-streamattachment. Without byte-signature detection, Hermes classifies it asDOCUMENT, so STT and voice-to-voice handling are bypassed.Missing transcoder
When Spectrum
voice()receives MP3 TTS output without eitherffmpeg-staticor a system FFmpeg, it fails with:@spectrum-ts/coretreatsffmpeg-staticas optional; Photon must declare it if native voice conversion is expected on clean installs.Scope clarification
This PR supplies two necessary prerequisites, but it does not by itself restore outbound media delivery on the currently pinned
spectrum-ts@8.0.0stack.Controlled live testing against the same Photon project, credential, registered user, chat GUID, and AAC/M4A fixtures found:
attachment()andvoice()fail withtarget_not_allowedvoice()fails with the expected transcoder errorA separate companion change is required to migrate the Photon sidecar to the current Spectrum SDK, remove the obsolete 8.x mixed-attachment patch, and validate the complete sidecar path. This PR intentionally keeps the CAF classifier and direct transcoder dependency reviewable independently.
Verification
pytest tests/plugins/platforms/photon/test_inbound.py -q→ 8 passedpytest tests/test_photon_voice_dependencies.py -q→ 1 passednpm ciffmpeg-staticand executed the bundled macOS binarynpm audit: 0 vulnerabilitiesThe live Spectrum 12 media matrix is manual acceptance evidence, not a claim that this branch already runs Spectrum 12.