Fitting an AI Device with Audio Decode and Conversion Parts
An AI device that has to make sound, speak a result, play a tone, render a voice, has to get from the audio it holds, often compressed and stored, to the analog signal a speaker can play. That path has two jobs, decoding the stored format into raw samples and converting those samples into an analog signal, and a device does them with a decoder and a converter, or with one part that does both. What it picks decides how the audio sounds and how much of the work the processor carries.
The two jobs are best kept separate in the mind even when one chip does both. Decoding turns a compressed file, an MP3 or similar, back into the stream of samples it came from, which is computation. Converting turns those samples into a voltage that swings a speaker, which is analog electronics. The first decides whether the processor has to spend its cycles on audio, and the second decides how clean the sound that comes out is.
Two steps, decode and convert
Audio rarely sits in a device as raw samples, because raw audio is large, so it is stored compressed and has to be decoded before it can be played. The decode is a fixed, repetitive computation, and a device can do it on the main processor in software or hand it to a chip built for it, and which way that goes depends on whether the processor has the cycles to spare.
The convert is the step that cannot be done in software, because at the end something physical has to turn a number into a voltage. A digital to analog converter does that, and the quality of the converter and the analog stage after it set the ceiling on how good the output can sound. A device that decodes perfectly and converts poorly sounds poor.
The split also decides where the cost lands. Putting the decode in software spends processor cycles and memory but no extra parts, while a dedicated decoder spends a part and a little board area and frees the processor, and the converter is a part either way once the output has to sound like anything. Naming where each job runs is the first move, before any chip is chosen.
Decoding the compressed audio
A device that plays stored audio, prompts, alerts, a spoken response, usually holds it compressed to save the storage, and that compressed audio has to be decoded back to samples before anything can play it. Doing that decode on the main processor costs cycles that an edge processor running a model may not have to give, which is the case for handing the decode to a dedicated part.
The VS1011E is an integrated MP3 audio decoder, a chip that takes a compressed MP3 stream in and produces decoded audio, with a converter on board so it goes from the file to an analog output in one part. It frees the processor from the decode entirely, taking the compressed data over a simple interface and handing back sound, which suits a device that has to play stored clips without spending its compute on them.
An integrated decoder like this is the simple path for playback. The processor sends it the compressed data and it does the rest, the decode and the conversion, so a small device gets audio output without a software codec or a separate converter. The output quality is set by what the part integrates, which is enough for prompts and alerts and speech, and not aimed at high fidelity music.
The format the device stores decides the decoder it needs. A device that holds MP3 needs an MP3 decoder, and one that uses another format needs a part or a software library that handles it, so the storage format and the decode are chosen together. Storing audio in a format nothing on the device can decode is a gap found late.
The decode also has to keep up in real time. Audio plays at a fixed rate, and the decode has to deliver samples at least that fast or the sound stutters, which is rarely a problem for a dedicated decoder and can be one for a busy processor decoding in software while it also runs a model. The margin between how fast the decode runs and how fast the audio plays is checked under the device real load.
Converting the digital audio to sound

Where the audio is already samples, decoded, generated, or streamed in raw, the remaining job is conversion, and where the output quality matters the converter is chosen for it. A converter turns each sample into a precise voltage, and how precise, how linear, and how quiet it is set how faithful the sound is to what the samples held.
The PCM1702U is a high precision audio DAC, a converter built for accuracy and a low noise floor, for a device where the output quality is part of the point rather than an afterthought. It takes a digital audio stream and produces a clean analog signal with the linearity that keeps quiet passages and fine detail intact, which suits a device that plays real audio content and not only beeps.
A discrete converter like this is chosen when the integrated path is not good enough. Its job is only conversion, so it is built to do that one thing well, with the resolution and the low noise that an integrated decoder's built in converter does not reach. The device pairs it with a separate source of samples, decoded in software or by another part, and an analog stage built to match.
Precision shows up in the parts of the sound that are easy to lose. A high resolution, linear converter holds the quiet detail and the smooth fades that a coarse converter turns to steps or buries in noise, which is why the precision matters on content with real dynamic range and matters little on a buzzer. The converter is chosen for the hardest audio the device has to render, not the easiest.
The converter sample rate and word length have to cover the content. A converter that tops out below the rate the audio was made at downsamples it and loses the top of the band, and one with fewer bits than the content has quantizes away its quiet detail, so the converter is matched to the best audio the device will play, with headroom rather than just enough.
The interface that feeds the converter
Between the source of samples and the converter runs a digital audio interface that carries the samples in a form the converter reads. I2S is the common one, a few lines that carry the audio data, a bit clock, and a word clock that marks the left and right channels, and the converter and the source have to agree on it down to the clock that times it.
The interface sets a constraint easy to miss until two parts do not talk. A decoder or processor that speaks I2S needs a converter that speaks I2S, at a sample rate and word length both support, and a mismatch in the format or the clocking is two parts that share a bus and still produce nothing. The interface is checked between the source and the converter before either is committed.
Where the part integrates the decode and the conversion, this interface is internal and the worry goes away, which is part of the simplicity an integrated part buys. A discrete converter brings the interface back into the design, as a thing to route and to match, which is part of the cost of the quality it offers.
The number of channels rides on the same interface. Stereo needs two channels carried on the one I2S bus, marked by the word clock, and a converter and source that disagree on mono against stereo, or on which channel is which, produce swapped or silent output. The channel count is part of the agreement, not an afterthought.
The converter sets the ceiling on the sound
The output chain mirrors the input chain, and the same rule governs both: the converter and the analog stage around it set a ceiling on the sound, and nothing in software lifts it. A perfect decode feeding a poor converter sounds poor, because the numbers are turned into voltage by a part that cannot place them precisely, and the noise the converter and its supply add sits under every quiet passage where the ear notices it readily. The resolution of the converter sets how finely the signal is quantized, and too few bits steps the smooth parts of the sound and buries the quiet ones in the gaps. The linearity sets whether a sample that should be twice as loud comes out twice as loud, and a converter that is not linear adds a distortion the source never had. The noise floor, set by the converter and by the cleanliness of its reference and supply, sits under everything, and a quiet recording played through a noisy converter is a quiet recording with a hiss on it. None of this is fixed downstream, because once the samples are a voltage with noise and distortion in it, the speaker faithfully plays the noise and the distortion along with the audio. This is the reason a device meant to sound good spends on the converter and the analog stage, and a device that only has to beep does not, and getting that judgment right is the difference between paying for fidelity a buzzer never needed and shipping a music device that sounds like a toy. The decode can be redone, the file re stored, the software improved, and the converter is the wall the sound runs into, so it is chosen for the quality the device is meant to have.
What makes the wall easy to ignore is that it does not announce itself. A device with a poor converter still makes sound, and on speech or a beep it sounds fine, so the limit only shows on the content that needed the quality, where the team that saved on the converter hears it too late. The judgment about how good the output has to be is made at selection, where it is cheap, not after a listening test on a built device.
Decode is software. Sound is the converter.
Integrated against discrete
The choice between an integrated decoder and a discrete converter is a choice about how good the output has to be and how much the team wants to build. An integrated part that decodes and converts in one chip is the fewest parts and the least software, and it is enough where the audio is speech, prompts, and alerts, which describes a great many devices.
A discrete converter, fed by a decode done elsewhere, is the path when the output has to sound genuinely good, because a converter built only to convert reaches a quality an all in one part does not. The cost is more parts, a source of samples, the converter, the analog stage, and more design effort to make them work together cleanly.
The decision follows the product. A talking toy or an appliance that announces a status takes the integrated path and is right to, while a device whose value is the sound it makes, a smart speaker meant for music, an instrument, takes the discrete converter and the analog design that goes with it. Spending on fidelity a device does not need is as much an error as skimping where it does.
There is a middle path many devices take. A codec that integrates a decent converter with the analog stage, a step above a bare integrated decoder and below a discrete high precision converter, covers the devices that want better than alerts but not studio audio, which is a large part of the market. The three tiers, integrated decoder, audio codec, discrete converter, map onto how much the sound matters.
The analog stage after the converter

The converter hands off an analog signal, and what happens to that signal before it reaches the speaker is as much a part of the sound as the converter itself. A reconstruction filter smooths the stepped output of the converter into a continuous waveform, removing the high frequency artifacts of the conversion that would otherwise reach the speaker or, worse, fold back into the audible band, and the filter is matched to the converter's sample rate to do that cleanly.
After the filter, the signal has to be driven to whatever the device plays through, and that driver depends on the load. A line output into another device's input is a light load and asks little, a headphone needs an amplifier that can drive the low impedance of the headphone without distorting, and a speaker needs the power amplifier that the earlier part of this pillar covered. The output stage is chosen for the thing it has to drive.
Coupling between the stages is a quiet source of trouble. The DC level at the converter's output is rarely the level the next stage wants, so the stages are coupled in a way that passes the audio and blocks the DC, and a coupling done carelessly rolls off the low end or adds a thump when the output turns on. The audio band has to pass cleanly from the converter to the speaker, and each junction is a place that can color the sound.
Grounding the analog audio is the same fight it was on the input. The analog ground for the converter and its output stage is kept clean and away from the digital and switching noise of the rest of the board, because noise that couples into the audio after the converter is noise the listener hears directly. A good converter on a noisy ground sounds like a worse converter.
The output stage also sets the levels and the protection. The signal is scaled to the level the next device expects, and the output is protected against a short or a plugged in cable shorting it, since an audio output on a connector is exposed to whatever is plugged into it. The analog stage is a small design of its own between the converter and the world.
Where the volume is set
Volume has to be controlled somewhere, and where it is set changes the sound. A digital volume control scales the samples before the converter, cheap and exact but throwing away resolution at low volume, since a quiet setting uses fewer of the converter bits and the noise floor rises relative to the signal. An analog volume control after the converter keeps the full resolution but adds an analog part and its own noise.
The better converters and codecs offer a volume control built to soften this, scaling in a way that keeps more of the resolution, or moving the control into the analog domain on chip. Deciding where the volume lives, and accepting what it costs, is part of the output design rather than a setting left to firmware to discover.
Muting belongs with the volume. A clean mute that ramps down rather than cutting hard avoids the click of a sudden stop, and the mute is wired so the device can silence the output fast when it needs to, on a fault or a mode change, without a pop. Volume and mute are one small control surface over the output.
Where the audio comes from
What the output chain has to handle depends on where the audio originates, and there are a few sources a device draws from. Stored clips, the prompts and alerts a device ships with, are decoded and played, and they are known in advance so the format and the decoder are chosen for them. Streamed audio, arriving over the network, has to be decoded as it comes and buffered against the network's unevenness, which asks more of the decode and the memory.
Generated audio is the case that grows with AI. A device that synthesizes speech produces samples from a model rather than a file, and those samples go straight to the converter without a decode step, which changes the chain, no decoder needed, but a converter and an analog stage good enough for synthesized voice to sound natural. The source decides whether a decoder is even in the path.
Latency separates the sources too. A stored alert can be buffered and played with no rush, while synthesized speech in a conversation has to start playing soon after the model produces it, so the output path for an interactive device keeps its buffering tight the way the input path did. The source sets not just the parts but how fast the chain has to turn audio around.
The mix of sources sets the design. A device that only plays a handful of stored alerts needs the least, while one that streams, decodes several formats, and synthesizes speech needs a chain that handles all of those, and knowing the full set of sources before choosing the parts is what keeps one of them from being discovered after the board is built.
The clock the converter runs on
A converter turns samples into voltage on the beat of a clock, and the steadiness of that clock shows up in the sound the way it did on the input. Jitter in the clock that times the conversion smears where each sample lands in time, which adds noise and distortion no quality of converter recovers from, worst on the high frequencies. A converter is given a clean, low jitter clock from a source chosen for it.
The clock and the data have to stay in step. The converter takes its samples on its clock, and if the source feeds them on a clock that drifts against the converter, samples are repeated or dropped and the audio glitches, which is why the audio path runs from one clock domain or is carefully synchronized across two. The clocking is designed for the path, not assumed.
The reference for the converter and the decoder can be shared or separate, and sharing one clean clock across the audio parts keeps them in step for free. A design that clocks the decoder and the converter from one source has no domain to cross, where two sources mean a synchronizer or a sample rate converter between them, a part and a complication chosen on purpose or regretted later.
Power and the audio output
The converter's sound is only as clean as the power behind it, which is the same lesson the rest of the analog board teaches. The converter measures each sample against its reference and supply, so noise on that supply rides straight into the output, and a converter fed from the same rail that powers the noisy digital logic plays that noise back through the speaker.
The fix is a clean supply for the analog audio. The converter and its analog stage get a quiet rail, often filtered or regulated separately from the digital supply, so the switching noise of the processor and the rest of the board does not reach the part that turns numbers into sound. The reference the converter measures against gets the same care, since a noisy reference is a noisy output.
The power amplifier at the end pulls the opposite way, drawing large, bursty current that can disturb the rails the converter needs quiet. So the amplifier's supply and the converter's supply are kept apart, the loud load and the sensitive measurement on separate paths, which is the same separation the motor and the logic needed elsewhere in this pillar.
The same care that keeps the supply clean keeps the pop out. A converter or amplifier powered up or down abruptly thumps the speaker, so the output stage is sequenced and muted through the transitions, which is a small circuit and a real part of a device that does not want to announce every power cycle with a pop.
Questions that come up fitting audio output
Do I need a separate decoder chip, or can the processor decode audio?
Either works, and it depends on the processor's spare cycles. A processor with compute to spare can decode in software and feed a converter, while one busy running a model can hand the decode to a dedicated chip. An integrated decoder that also converts is the simplest path when the processor should not spend cycles on audio.
When do I need a high precision DAC instead of an integrated part?
When the output quality is part of the product, music, an instrument, anything with real dynamic range. An integrated decoder's built in converter is enough for speech, prompts and alerts, but a discrete high precision converter reaches the resolution and low noise that good audio needs and an all in one part does not.
Why does my audio output sound noisy even with a good DAC?
Usually the supply or the ground, not the converter. A converter measures samples against its reference and supply, so noise there rides into the output, and a noisy analog ground couples in after the conversion. Give the converter a clean, separate supply and a clean analog ground kept away from the digital and switching noise.
What does the analog stage after the DAC do?
It smooths the converter's stepped output with a reconstruction filter, drives the load whether that is a line, a headphone, or a speaker, and couples the stages so the audio passes and the DC does not. It is a small analog design between the converter and the speaker, and it colors the sound as much as the converter.
Does synthesized speech need a decoder?
No. Synthesized speech comes out of a model as samples, not a compressed file, so it goes straight to the converter with no decode step. It still needs a converter and an analog stage good enough for the voice to sound natural, but the decoder is not in that path.
Can one chip do both decode and conversion?
Yes, an integrated decoder with a converter on board takes compressed audio in and produces an analog output, which is the fewest parts and least software. It suits speech, prompts and alerts. For audio that has to sound genuinely good, a separate decode and a discrete high precision converter do better.
Fitting the audio output in order
The order keeps the chain coherent. Start from what the device has to play and how good it has to sound, stored clips, streamed audio, synthesized speech, and the quality each demands. Decide where the decode happens, on the processor, in a dedicated chip, or not needed for generated audio. Choose the converter for the quality the output has to reach, an integrated part for speech and alerts or a discrete high precision converter for real audio. Build the analog stage, the filter, the driver for the load, the clean coupling, to match. And give the converter a clean supply and ground, kept away from the noisy parts of the board.
None of this is reinvented per device. The interface, the clean supply, the reconstruction filter, and the output protection are the same shape from one audio output to the next, captured once and reused, so the effort goes into the quality decision and not into rediscovering the analog stage.
The thread through all of it is that the converter and the analog stage set the ceiling on what comes out, the same way the front end set the ceiling on what came in, so the sound a device makes is decided in the hardware that turns its numbers back into a signal. Get it right and the device sounds the way it was meant to. Get it wrong and the best audio plays back through a wall the converter put up.




