Online Audio Parser and PCM Player

Parse and play raw PCM streams, WAV, MP3 and more with interactive waveforms, acoustic metrics, frame structure breakdown and hex data inspection.

Working with audio pipelines, speech recognition (ASR/TTS), Bluetooth protocols, or embedded audio firmware regularly requires debugging raw PCM streams. Raw PCM has no headers or metadata: if the sample rate, bit depth, channel count, or byte order is off by even a single parameter, the result is loud white noise, high-pitched garble, or clipping.

This tool runs entirely in your browser using the Web Audio API and TypedArrays. Audio decoding, waveform rendering, and hex inspection happen inside local memory without uploading any bytes. It allows scrubbing and seeking through interactive waveforms, explores interleaved frame layouts from first principles, and packages raw PCM into standard playable WAV files with a single click.

Digital audio and PCM physical fundamentals

Sound waves are continuous fluctuations in air pressure. Digital audio discretizes this acoustic wave using Pulse Code Modulation (PCM). The sample rate (such as 16000 Hz or 44100 Hz) specifies how many discrete measurements are captured per second. The bit depth (such as 16-bit signed integer) determines the dynamic range and quantization resolution. Because a raw PCM stream is simply a sequence of numbers without a header, the player must know the physical parameters in advance to reconstruct the waveform.

Why wrong bit depth or byte order produces white noise

In 16-bit PCM, each sample occupies 2 bytes. On Little-Endian architectures, the least significant byte comes first. If read as Big-Endian, the most significant bits (which represent wave magnitude) swap places with the least significant bits. The values alternate violently between positive and negative extremes, creating full-scale screeching white noise. Similarly, interpreting 16-bit audio as 8-bit cuts the wave into fragmented steps, resulting in heavy distortion.

Channel interleaving and memory layout

Mono audio contains one sample per frame. Stereo audio contains two samples per frame: Left (L) and Right (R). Standard PCM files interleave channels in memory as [L0, R0, L1, R1, L2, R2...]. If mono data is played as stereo, alternating audio samples are routed to separate ears. Conversely, playing stereo data as mono doubles the perceived playback speed and introduces comb filtering.

Packaging raw PCM into standard RIFF WAV files

A standard WAV file is essentially raw PCM preceded by a 44-byte RIFF container header: the "RIFF" chunk ID, overall file size, "WAVE" format identifier, "fmt " subchunk (declaring audio format 1 for PCM, channel count, sample rate, byte rate, and block alignment), followed by the "data" subchunk header. This tool formats your configured PCM stream into a standard WAV header so that any operating system or media player can open and play it immediately.

Advertisement

Frequently asked questions

What is the difference between raw PCM and WAV?
PCM is the raw digitized audio sample stream itself, containing no header or metadata. Ordinary players cannot play standalone PCM files because they do not know the sample rate or bit depth. WAV is a container format created by Microsoft and IBM that prefixes the PCM stream with a 44-byte header describing these parameters. Adding the correct RIFF header turns raw PCM into a standard WAV file.
Why does playing a PCM file produce loud screeching white noise?
This usually stems from three causes: an inverted byte order (Little-Endian vs Big-Endian), an incorrect bit depth (such as choosing 8-bit for a 16-bit file), or a file that actually possesses a container header (like WAV or MP3 ID3 tags) being fed as raw PCM, causing header bytes to be decoded as audio samples. Check the container detection notice at the top or inspect the first few bytes in the Hex viewer.
Why does the audio sound high-pitched like a chipmunk or too slow and deep?
The selected sample rate does not match the original recording rate. For example, playing audio recorded at 16000 Hz with a 32000 Hz setting doubles the consumption rate of samples per second, halving the duration and raising the pitch by an octave. Setting a lower sample rate than recorded produces slow, low-pitched playback.
How can I discover the sample rate and bit depth of an unknown PCM file?
Use the file size formula: File Size (bytes) = Duration (seconds) * Sample Rate * Channels * (Bit Depth / 8). Common configurations include 16000 Hz 16-bit mono for speech recognition (ASR/TTS) and 44100 Hz or 48000 Hz 16-bit stereo for music. Cycle through these common presets in the parameter bar until speech or music sounds clear and natural.

Related tools

Advertisement