Audio format check & conversion model
Checks duration, channels, sample rate and header MIME for 10-second audio fixtures; opens only controlled-test WAV/MP3 combinations and emits a verifiable model report.
Inputs and parameters
input— Local audio filetarget— Target formatchannels— ChannelssampleRate— Sample rate Hz
Real example
ten-second.wav · audio/wav · 1,764,000 B · 10 s · 2 ch · 44100 Hz · RIFF/WAVE header · target wav · channels=2 sampleRate=44100
→ media-audio-convert-<timestamp>.txt (text/plain controlled acceptance report): durationSeconds=10 · channels=2 · sampleRate=44100 · frameCount=441000 · mime=audio/wav · extension=wav · decode.ok=true · phases=validate>…>release. Not a real WAV binary; nothing uploaded.
Limits and failure handling
Initial budget 50 MiB / 5 min; 100 MiB+ rejected early. Open combinations are only 10 s 44.1 kHz stereo WAV→WAV, WAV→MP3, MP3→WAV (controlled model). No real ffmpeg.wasm/LAME/ffprobe/browser decode was bundled or tested; a real File shows a readable unavailable error and the output is a text report, not playable audio. No vertd upload, no Stripe/donation/analytics.
FAQ
Can it output FLAC or 48 kHz?
No. Unverified registry rows or option sets stay closed with UNSUPPORTED_CODEC / UNVERIFIED_OPTIONS; no extension renaming is used to fake success.
What if I rename .mp3 to .wav?
The header is still ID3/MPEG, so sniffed MIME disagrees with the extension: MIME_MISMATCH is raised before any worker is created.