What is MIME type "audio/basic"?
A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.
The MIME type audio/basic marks files that carry simple audio data. It uses a low-fidelity encoding with μ-law compression. This format is designed for basic voice and sound data. It is mostly found in applications where simplicity and small file size matter.Files with this format often use containers like SND and AU.
- Use Case: Telephony and voice recording where only simple audio is needed.
- Fact: It typically uses an 8000 Hz sampling rate with 8-bit resolution.
- Fact: Its simple structure supports fast streaming and low resource processing.
- Use Case: Basic notifications or embedded sound effects in software.
Associated file extensions
Usage Examples
HTTP Header
When serving content with this MIME type, set the Content-Type header:
Content-Type: audio/basic
HTML
In HTML, you can specify the MIME type in various elements:
<a href="file.dat" type="audio/basic">Download file</a>
Server-side (Node.js)
Setting the Content-Type header in Node.js:
const http = require('http');
http.createServer((req, res) => {
res.setHeader('Content-Type', 'audio/basic');
res.end('Content here');
}).listen(3000);
Associated file extensions
FAQs
What file extensions are associated with audio/basic?
The most common file extensions for this MIME type are .au and .snd. These formats originated on Sun Microsystems and NeXT systems and are linked to the au and snd extensions.
How do I configure Apache or Nginx to serve audio/basic files?
For Apache, add the line AddType audio/basic .au .snd to your .htaccess file. For Nginx, ensure your mime.types file includes the mapping audio/basic au snd; so browsers interpret the stream correctly.
Is audio/basic supported by the HTML5 <audio> element?
Support is inconsistent across modern browsers compared to standard formats like MP3 or AAC. While some browsers may play it natively due to legacy support, it is generally safer to use audio/mpeg or audio/wav for modern web applications.
What specific audio encoding does audio/basic use?
The standard strictly defines audio/basic as single-channel audio encoded using 8-bit ISDN μ-law (mu-law) at a sample rate of 8000 Hz. This configuration was designed to match digital telephony standards.
Why would I use audio/basic instead of MP3?
You generally should not use it for music or high-fidelity audio. However, it remains useful for telephony applications (like IVR systems) and legacy hardware that specifically requires the simple, low-bandwidth μ-law format.
How can I convert an MP3 file to audio/basic format?
You can use a tool like FFmpeg to convert audio to this specific format. A common command is ffmpeg -i input.mp3 -f au -ac 1 -ar 8000 -acodec pcm_mulaw output.au, which enforces the required 8000 Hz sample rate and μ-law encoding.
What happens if the MIME type is missing for .au files?
If the server does not send the audio/basic header, browsers may attempt to download the file rather than play it. In some cases, the browser might misinterpret the data as binary text, displaying garbled characters instead of playing sound.
General FAQ
What is a MIME type?
A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.
MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.
MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.
How do I find the MIME type for a file?
You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.
Why are multiple MIME types listed for one extension?
Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.