Skip to content

fix(transcription): accept WhatsApp .opus voice notes in file transcription - #866

Open
juanmartitegui wants to merge 1 commit into
altic-dev:mainfrom
juanmartitegui:fix/accept-whatsapp-opus-files
Open

fix(transcription): accept WhatsApp .opus voice notes in file transcription#866
juanmartitegui wants to merge 1 commit into
altic-dev:mainfrom
juanmartitegui:fix/accept-whatsapp-opus-files

Conversation

@juanmartitegui

@juanmartitegui juanmartitegui commented Aug 16, 2026

Copy link
Copy Markdown

Description

Drag-and-dropping a WhatsApp voice note (.opus) onto the file-transcription drop zone shows "Accepted file types…" and rejects the file, even though macOS decodes Ogg Opus natively.

Root cause: MeetingTranscriptionService.supportedFileExtensions is built from AVURLAsset.audiovisualTypes(), but only keeps each UTType's single preferredFilenameExtension. The Ogg audio type (org.xiph.ogg-audio) declares the extension tags ["ogg", "oga", "opus"] with ogg as preferred, so .opus and .oga were dropped from the accepted set while the decoder fully supports them (verified with a real WhatsApp .opus file: AVAudioFile/AVAsset read it fine — mono, 48 kHz, 24 s).

Fix: build the set from every filenameExtension tag of each decodable audio/video UTType instead of just the preferred one, and mention OPUS in the supported-formats copy. No transcoding or special-casing needed — the existing pipeline handles the file once the extension check stops rejecting it. Every previously accepted extension is still accepted (verified: old set ⊆ new set); the set still derives only from what AVFoundation reports as decodable, so subtitles/playlists remain excluded.

Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 🧹 Chore
  • 📝 Documentation update

Related Issue or Discussion

Closes #868

Testing

  • Tested on Intel Mac
  • Tested on Apple Silicon Mac
  • Tested on macOS version: 26 (Darwin 25.5.0)
  • Ran linter locally: swiftlint --strict --config .swiftlint.yml Sources (not installed locally — relying on CI)
  • Ran formatter locally: swiftformat --config .swiftformat Sources (not installed locally — relying on CI)
  • Ran tests locally: added SupportedFileExtensionsTests (regression: .opus/.oga accepted, common formats kept, non-audio types still excluded). Local machine has no full Xcode, so XCTest runs in CI; the exact old-vs-new set logic was verified locally with a standalone Swift script against AVFoundation, and the real WhatsApp .opus file was verified decodable via AVAudioFile/AVAsset.

Screenshots / Video

  • No UI/visual changes; screenshots/video are not applicable.

No layout or visual behavior changes. For full transparency, the supported-formats caption/error string constant gains one word:
before — "Supported: WAV, MP3, M4A, OGG, MP4, MOV, and more"
after — "Supported: WAV, MP3, M4A, OGG, OPUS, MP4, MOV, and more"

Notes

UTType.tags[.filenameExtension] also picks up other alternate extensions macOS already decodes (.wave, .bwf, .aif, .mpeg, .m2ts, .3gpp, …), which is strictly more permissive but still bounded by AVURLAsset.audiovisualTypes() — i.e. only formats the OS decoder claims to support.

🤖 Generated with Claude Code

WhatsApp voice notes are Ogg Opus files with a .opus extension. macOS
maps .opus and .oga to the same UTType as .ogg (org.xiph.ogg-audio) and
decodes them natively, but supportedFileExtensions was built from each
UTType's single preferredFilenameExtension, dropping every alternate
extension tag — so dropping a WhatsApp .opus file was rejected as
unsupported even though the decoder fully supports it.

Build the set from every filenameExtension tag of each decodable
audio/video UTType instead, and mention OPUS in the user-facing copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added needs PR template Pull request is missing required template content. needs screenshots Pull request needs screenshot or video evidence. labels Aug 16, 2026
@github-actions

Copy link
Copy Markdown

The PR Policy check is blocking this PR because required template information is missing.

Please update the PR description with:

  • Related Issue or Discussion
  • Screenshots / Video

Screenshots or video are required for UI, UX, settings, onboarding, overlay, menu bar, or visual behavior changes. If this PR has no visual changes, check the no-visual-change box in the template.

If this remains incomplete for 48 hours after opening, the PR may be closed.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

The PR broadens file-transcription extension detection to include every filename-extension tag exposed by AVFoundation-backed audio and movie UTTypes, allowing WhatsApp .opus voice notes and .oga files through existing validation.

  • Adds OPUS to supported-format and drop-error copy.
  • Adds regression coverage for Ogg aliases, common formats, and excluded non-media extensions.
  • Registers the new tests with the Xcode integration-test target.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified.

The extension set remains bounded to AVFoundation-reported audio and movie UTTypes, both validation paths consume the same set, and the added tests cover the intended aliases and representative regressions.

Reviews (1): Last reviewed commit: "fix(transcription): accept .opus/.oga fi..." | Re-trigger Greptile

@github-actions github-actions Bot removed needs PR template Pull request is missing required template content. needs screenshots Pull request needs screenshot or video evidence. labels Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File transcription rejects WhatsApp .opus voice notes even though macOS decodes them natively

1 participant