Map companion m4a mime variants to the m4a transcription format - #172
Merged
Conversation
supabase-swift derives the storage content type from the .m4a extension instead of the explicit FileOptions value, so companion recordings are stored as audio/x-m4a. audioFormatFromMime mapped only audio/mp4 and fell through to webm, so the STT provider rejected every companion upload with 415 unsupported_format; no companion recording could ever transcribe. audio/mp4, audio/x-m4a, and audio/m4a now map to m4a. audio/aac keeps its raw-ADTS aac mapping since nothing in the pipeline labels m4a files that way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second layer of the prod transcription outage (first was the entitlement gate, #171). supabase-swift stores companion recordings with an extension-derived content type (
audio/x-m4a), butaudioFormatFromMimeonly mappedaudio/mp4and defaulted everything else towebm, so the STT provider 415'd every companion upload asunsupported_format. Verified live on app.getminutia.com: after the entitlement grant, both transcribe routes fail exactly here.audio/mp4,audio/x-m4a,audio/m4anow map tom4a(codecs suffixes already stripped).audio/aackeeps its raw-ADTSaacmapping: call-site tracing shows nothing in the pipeline labels m4a files that way, andaacis a valid provider format.Tests: failing-first case table over all mime variants through the public
transcribeWithOpenRouter; 38/38. Two independent reviews; the aac scope refinement above came out of the second.