Why Android Would Not Select M4A: An Audio Compatibility Fix

A file plays normally on the phone, yet the web upload field grays it out. It looks like an unsupported-format problem, but the failure may actually occur before the file ever reaches the analysis code.

The Problem Happens at the “Choose File” Step

The original upload control restricted the file picker to common audio MIME types. This usually works in desktop browsers, but some Android systems report M4A as video/mp4application/mp4, or even an incomplete type. The file may contain valid audio, but the system picker judges only by the type label, so the user cannot select it before the upload even begins.

This issue is a reminder that the MIME shown by the browser is a description provided by the device and file manager, not a final determination of file contents. Treating it as absolute truth creates compatibility breakpoints on mobile devices.

File Extensions, MIME, Containers, and Codecs Are Not the Same Thing

.m4a is a common file extension; MIME is the type label the system passes to the webpage; MP4 is a container; and the container usually holds an actual audio codec such as AAC. The four are related but not interchangeable. Renaming the extension does not convert the codec, and an incorrect MIME label does not necessarily mean the file is damaged.

ClueWhat It Can Tell YouWhat It Cannot Tell You
File ExtensionHow users and apps expect the file to be openedDoes not prove the internal codec is actually valid
MIMEHow the Device Describes the SelectionDifferent Android systems may report different values
ContainerHow the Audio Stream and Metadata Are PackagedThe same container can hold different codecs
Decode ResultWhether the server can actually decode the audioStill does not prove the content is suitable for voice analysis

How CVoice Fixed It

The upload control was changed to a general file picker so Android no longer blocks M4A in advance. After a file is selected, the webpage applies an allowlist check and accepts only WAV, MP3, M4A, WebM, OGG, and AMR. For files that can be identified reliably but lack a standard extension, the page completes the filename;audio/mp4audio/x-m4avideo/mp4 and application/mp4 all enter the M4A compatibility path.

This does not mean “accept every file.” The picker makes files selectable, the frontend allowlist performs the first safety check, server-side decoding verifies the actual contents, and audio-quality thresholds then determine whether the material is sufficient to generate a report. During the fix, all 79 full-service tests passed, and dedicated checks for Android M4A MIME aliases were added.

A General Diagnostic Order from This Fix

  1. First confirm that the file is visible in the system picker instead of immediately suspecting the analysis algorithm.
  2. Log the file extension and MIME reported by the device instead of collecting only “upload failed.”
  3. Separate “allowed to select” from “allowed to process” so compatibility does not require giving up validation.
  4. Show different messages for decode errors, insufficient duration, too much silence, and unsupported formats.
  5. Retest on real mobile devices instead of relying only on desktop browser emulation.
Scope & LimitsThis mapping solves the problem of valid audio being blocked by mistake. It cannot repair corrupted internal data, encoder failures, or non-audio files disguised as audio; the final decision still depends on actual decoding.