What is PCM audio? How samples are stored as digital values
Learn how pulse-code modulation represents a continuous signal with samples and numbers, and how Linear PCM, WAV, and sampling settings differ.
Pulse-code modulation (PCM) stores an audio waveform by measuring it at regular intervals and encoding each measurement as a number. In speech processing, PCM is an encoding of audio data, not a filename extension. Linear PCM usually stores uncompressed sample values, while PCM also has variants such as μ-law and A-law that use nonlinear quantization. Library of Congress PCM format description
From sound to PCM values
A microphone turns sound into an electrical signal. An analog-to-digital converter (ADC) reads its voltage at regular time intervals and converts each reading to a digital value. The interval is described by the sample rate; bit depth sets the precision for representing each amplitude. A 16 kHz, 16-bit setting means 16,000 values per second, each represented with 16 bits. Channel count tells how many independent signals are recorded in time alignment. MDN digital audio concepts
PCM is straightforward to decode, and Linear PCM preserves sample values without lossy compression. Its drawback is that raw data can be large: storage grows with sample rate, bit depth, channel count, and duration. Some PCM variants used for telephony use nonlinear quantization to use limited bandwidth more efficiently. Do not assume every format called PCM is uncompressed or high-fidelity. Library of Congress PCM description
Distinguish PCM, WAV, and compressed codecs
WAV is a container; PCM is an encoding of sample values. PCM audio is often stored in WAV, but WAV does not imply one particular PCM configuration. A file contains format information describing items such as sample format, rate, channels, and bit depth, plus the audio data. Microsoft’s WAVEFORMAT structures describe these settings, including cases with multiple channels or valid bits that differ from the sample container size. Microsoft WAVEFORMATEX
Compressed codecs such as MP3, AAC, or Opus turn PCM samples into smaller representations for storage or transmission. Decoding produces playable samples, but lossy codecs may discard information from the original waveform. Saving a compressed file as WAV does not restore data that was discarded.
Check a PCM file before using it
Read the encoding, sample rate, bit depth, and channel count from file properties or a decoder. Do not infer PCM or its settings from the .wav extension alone.
Compare the actual settings with the speech model’s input requirements. If rate or channels differ, convert the waveform appropriately and keep the original separately.
Listen after conversion to confirm duration and playback speed are as expected, and verify that metadata matches the data. If a model rejects the file, reread codec, rate, channels, and sample-format information first.
Choose PCM with storage needs, processing purpose, and device or model requirements in mind. PCM is a basic way to represent audio samples, not a guarantee of a clean recording or accurate recognition.