Skip to content

feat(audio): accept audio uploads (.mp3, .m4a, .wav, .ogg, .webm) and direct audio URLs - #148

Merged
lenzhq merged 2 commits into
mainfrom
feat/audio-support
Nov 20, 2026
Merged

lenzhq merged 2 commits into
mainfrom
feat/audio-support

Conversation

@lenzhq

@lenzhq lenzhq commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Summary

Extends extract_file, review_file, review_file_and_wait, and CLI lenz extract / lenz review in the Python SDK (lenz-io) to accept standalone audio files (.mp3, .m4a, .wav, .ogg, .webm) alongside .docx, .pdf, and images, in parity with lenzhq/lenz-io-node.

Changes

  • src/lenz_io/_shared.py (_read_upload_file):
    • Accept .mp3 (audio/mpeg), .m4a (audio/mp4), .wav (audio/wav), .ogg (audio/ogg), and .webm (audio/webm).
  • src/lenz_io/client.py, src/lenz_io/async_client.py, src/lenz_io/_core.py:
    • Apply the 90.0s timeout floor (URL_TIMEOUT_FLOOR) to review_file on image and audio uploads.
    • Document audio file uploads and direct audio URLs across extract, extract_file, review, review_file, and review_file_and_wait.
  • src/lenz_io/cli/commands.py, src/lenz_io/cli/review.py:
    • Auto-detect .mp3, .m4a, .wav, .ogg, .webm files on disk in lenz extract <file> and lenz review <file> and upload via extract_file() / review_file().
  • README.md, CHANGELOG.md, skills/lenz-api/SKILL.md, context7.json, tests/:
    • Add unit tests for audio upload MIME types, 90s timeout floor, CLI binary audio dispatch, and unsupported extension error message.

Post-deploy actions & prod testing

  1. Merge after lenzhq/Lenz#1772 is deployed to production.
  2. Refresh openapi.json from the live API and release in parity with lenzhq/lenz-io-node.

@lenzhq
lenzhq merged commit 24ce218 into main Nov 20, 2026
13 checks passed
@lenzhq
lenzhq deleted the feat/audio-support branch November 20, 2026 21:56
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.

1 participant