Technology

How Does a Microphone Turn Your Voice Into Digital Data?

Or: how vibrating air becomes numbers, crosses the internet, and turns back into sound. Your words never travel. A description of the vibration does.

Or: How Vibrating Air Becomes Numbers, Crosses the Internet, and Turns Back Into Sound

Say something into your phone. It might save a voice memo, recognize a command, or send your words to someone on another continent, where a speaker reproduces them closely enough that the listener recognizes your accent, your tone, even your mood. That's an odd achievement once you remember what a voice physically is. It isn't words traveling through the air. It's a sequence of pressure changes, made when your vocal cords vibrate and your throat, tongue, and lips shape the result. Some sounds, like an "s," come mostly from turbulent airflow rather than vibrating cords. Either way, air molecules nudge their neighbors, energy spreads outward as a pressure wave, and the molecules themselves never make the trip from your mouth to the listener's ear.

A microphone sits in that wave and gets pushed and pulled by it. It has no idea what a word is. It detects a physical phenomenon, and everything afterward is a chain of translations: air pressure into motion, motion into a voltage, voltage into numbers, numbers into packets, and at the far end, all of it back into moving air.

From Pressure to Voltage

Most microphones begin with a diaphragm, a thin membrane that moves when pressure varies. The motion is minuscule; it only needs to follow the wave quickly and consistently across audible frequencies. The designs differ in how they convert that motion into electricity. Shure's explanation of microphone transducers lays out the two classic approaches. In a dynamic microphone, a voice coil is attached to the back of the diaphragm and sits in a magnet's field, so sound moves the coil through the field and generates a corresponding signal, which is the same principle as a generator, just tiny. A condenser microphone has no coil. Its thinner diaphragm sits near an electrically charged back plate, and as the diaphragm vibrates it changes the spacing between the two, producing the signal. Condensers need power for that, either a battery or phantom power, which is part of why they show up in studios and why dynamics are the rugged choice for live vocals.

The microphone in your phone is neither of those at full size. It's usually a MEMS microphone, a microelectromechanical device built with semiconductor-style manufacturing, the same family of technology as the tiny motion sensors that tell your phone which way is up. A distributor's overview of MEMS microphones describes the typical arrangement: a capacitive sensing element made through silicon micromachining, paired with an integrated circuit that handles the interface. The principle echoes a studio condenser, with movement changing a capacitance, shrunk to a chip small enough that a phone can carry several. The openings you see along the edges are only entrances. They lead through mesh, seals, and cavities that balance getting pressure fluctuations to the sensor against keeping out dust and moisture, which is why a tiny hole can still record speech well, and why dirt, a damaged mesh, or a case that blocks the opening can quietly worsen recordings.

Turning a Waveform Into Numbers

The microphone's sound-sensing element produces an analog electrical signal: a voltage that rises and falls continuously, like a wave drawn on paper. A computer can't store a continuous line, so an analog-to-digital converter measures the voltage at regular intervals and writes each measurement down as a number. This is sampling. Think of recording the height of ocean waves at one spot every fraction of a second. Take enough measurements and you can reconstruct the behavior of the waves without having stored every instant.

Not every microphone sends an analog voltage to a separate converter, though. Many modern phones use digital MEMS microphones, which combine a microscopic sound-sensing diaphragm with electronics that convert its electrical signal into digital form inside the microphone package. Some output a high-speed stream of bits called pulse-density modulation (PDM), which the phone then processes into conventional digital audio samples. The underlying process is the same: sound waves become electrical signals, and those signals become digital information. The difference is where the conversion happens.

How often to measure is the sample rate. Music commonly uses 44,100 samples per second, while video, communication, and professional workflows often use 48,000. That sounds extravagant until you consider how fast audio waveforms change. The governing rule is the Nyquist–Shannon theorem. Indiana University's digital audio text, which traces the idea from Harry Nyquist in 1928 to Claude Shannon's proof in 1948, states it directly: the sampling rate must be at least twice the highest frequency to be reproduced, and the highest reproducible frequency, half the sample rate, is called the Nyquist frequency. Human hearing tops out around 20,000 hertz at best, so rates above 40,000 comfortably cover it, and 44,100 and 48,000 do exactly that.

Break the rule and you get aliasing. The same text shows what happens: frequencies above the Nyquist frequency fold back below it as false tones. Its example is a 12,000 hertz tone sampled at 20,000 samples per second, which comes out as 8,000 hertz. The result isn't silence; it's a sound that was never in the room. That is why converters filter out frequencies above the usable range before sampling, and why the number of samples is not the whole story: the point is for the numbers to represent the sound correctly.

Each measurement also needs precision. Bit depth is how many distinct levels are available to describe a sample's amplitude: 16 bits gives 65,536 values, and 24 bits gives more than 16 million. The converter rounds each reading to the nearest available level, and the leftover difference, quantization error, behaves like a small amount of noise. More bits shrink it and widen the dynamic range, though a 24-bit recording of a noisy room is still a recording of a noisy room, and the extra headroom matters most to engineers who process the audio later. Set the level too high and you get clipping, where peaks flatten at the maximum value and the waveform's shape is lost, producing harsh distortion that can't be undone. Set it too low and boosting it later boosts the noise too.

At this point your voice is a long stream of numbers describing pressure over time. The computer doesn't see the word "hello." It sees sample values, which is why a recording can capture your accent, your laugh, and the traffic outside without understanding any of it. Speech recognition is a separate process that analyzes the numbers afterward. Recording sound and understanding speech are two different achievements.

Too Many Numbers

Uncompressed audio is large. One minute of mono audio at 48,000 samples per second and 16 bits per sample comes to roughly 5.76 megabytes, and stereo doubles it. That's fine for a short memo and punishing for hours of audio or a live call over a weak connection. So codecs compress the stream. Lossless ones like FLAC shrink the data and decode back to exactly the original samples. Lossy ones like MP3, AAC, and Opus go further by discarding or approximating what matters least to perceived quality.

Different codecs serve different jobs. The IETF's specification for Opus, RFC 6716, describes a codec built for a wide range of interactive audio applications, including voice over IP, videoconferencing, in-game chat, and live distributed music. It scales from low-bitrate narrowband speech at 6 kilobits per second up to very high-quality stereo music at 510, and its algorithmic delay runs from 5 to 65.2 milliseconds, with its design mixing techniques suited to speech and to music. Real-time voice cares about speed and resilience as much as fidelity, the same latency-versus-stability tradeoff that shapes Bluetooth audio. A live call is not a recording sent quickly; it's a continuous pipeline in which too much buffering makes people talk over each other and too little lets network hiccups chop up the sound.

At the other end, the process runs in reverse. The receiving device decodes the packets, a digital-to-analog converter turns the samples back into a voltage, and an amplifier drives a speaker, where a coil in a magnetic field moves a diaphragm that pushes and pulls the air. Pressure waves similar to the ones that hit your microphone reach the listener. The air near your mouth never traveled to their phone. What traveled was information about the sound.

Why Phones Have Several Microphones

Look closely at a modern phone and you may find more than one microphone opening. They aren't redundant. Recording from different positions gives the software extra information about the acoustic scene: a microphone near your mouth hears mostly voice, another hears more of the surroundings, and comparing the two helps separate speech from background. Systems can also exploit timing. Sound crosses two centimeters of air in about 58 microseconds, a difference small enough to seem useless, yet at 48,000 samples per second the gap between samples is about 21 microseconds, and software can work with fractions of that. By comparing arrival times and phase, an array of microphones can favor sound coming from the direction of your mouth, a technique called beamforming, giving directional behavior without a large directional microphone.

Other processing sits on top. Noise suppression, often assisted by machine-learning models trained on many examples of speech mixed with noise, tries to reduce competing sounds without damaging the voice. Echo cancellation solves a speakerphone problem: the phone knows what it is sending to the loudspeaker, so it can estimate how that sound will reappear in the microphone and subtract it. Automatic gain control keeps levels sensible as you move nearer or farther. All of this helps calls sound clean, and all of it can backfire. Over-aggressive processing makes voices watery or metallic and can swallow quiet syllables, so an odd-sounding recording is not always a bad microphone; sometimes it's software trying too hard.

Why Your Voice Sounds Strange on Playback

Most people dislike hearing a recording of themselves. When you talk, you hear your voice through the air and through vibrations conducted by the bones and tissue of your head, which adds low-frequency richness. A microphone picks up the airborne path, so playback is closer to what other people hear, shaped further by the room, the microphone, and the codec. Placement matters as much as hardware: a microphone near the mouth favors the voice over distant noise, while a distant one records more of the room's reflections. A cheap microphone placed well can beat an expensive one placed badly.

The Bard's Take

When you speak into your phone, your words don't enter it as words. They arrive as pressure waves that move a microscopic diaphragm. The movement becomes an electrical signal, and an analog-to-digital converter measures that signal tens of thousands of times a second, turning each measurement into a number. After that, software can filter, clean, level, compress, store, or transmit it. At the far end, the numbers are decoded, converted back to a voltage, and used to move a speaker diaphragm, recreating pressure waves for another person's ears.

Everything clever in between, from beamforming to echo cancellation to codecs, rests on one plain physical fact: sound is vibration, and vibration can be measured. The microphone doesn't understand your voice. It doesn't know whether you're happy, or asking a question, or whether you're speaking at all. It reports tiny movements, and other systems decide what they mean.

You speak. Air pressure changes. A diaphragm moves. A voltage forms. Numbers appear. Those numbers cross an ocean in a fraction of a second, and a speaker on the other side moves just enough air for someone to recognize you. A conversation between two people becomes a conversation between two vibrating membranes, with a remarkable amount of mathematics holding them together.

Sources