AudioOverlay[{audio1,audio2,…}]
returns an audio object by overlaying all audioi.
AudioOverlay
AudioOverlay[{audio1,audio2,…}]
returns an audio object by overlaying all audioi.
Details and Options
- When overlaying audio objects, channel
of the resulting audio is an overlay of all 
channels of all audioi that have at least
channels. The overlaid values are accumulated. - All audioi are conformed to have the same duration, data type, number of channels, and sample rate.
- AudioOverlay takes a SampleRate option to specify the sample rate of the resulting Audio object. By default, the highest sample rate available is used.
Examples
open all close allBasic Examples (2)
AudioOverlay[{Audio[{1}], Audio[{1}]}]//AudioDataa1 = .5AudioGenerator["Sin"];
a2 = .5AudioGenerator["White"];AudioOverlay[{a1, a2}]AudioPlot[%, PlotRange -> .01]Overlay two audio signals using a specified offset:
a1 = .5AudioGenerator[{"Sin", 5000}];
a2 = .5AudioGenerator["White"];AudioOverlay[{{a1, 0}, {a2, 0.5}}]Spectrogram of the overlaid signal:
Spectrogram[%, FrameTicks -> None]Scope (4)
Control the offset between the audio objects to be overlaid:
a1 = .5AudioGenerator["Sin"];
a2 = .5AudioGenerator["White"];overlayed = AudioOverlay[{{a1, .5}, {a2, 1}}]AudioPlot[%]Overlay audio objects with different types:
a1 = AudioGenerator["Sin", 1, "SignedInteger8"];
a2 = AudioGenerator[{"Sin", 200}, 1, "Real"];AudioOverlay[{a1, a2}]AudioType[%]Overlay audio objects with different sample rates:
a1 = AudioGenerator["Sin", SampleRate -> 10000];
a2 = AudioGenerator[{"Sin", 200}, SampleRate -> 44100];AudioJoin[{a1, a2}]AudioSampleRate[%]Join audio objects with different numbers of channels:
a1 = .5AudioChannelCombine[Table[AudioGenerator["Sin", 1.5], 2]];
a2 = .5AudioGenerator["White"];AudioOverlay[{a1, a2}]AudioPlot[%]Options (1)
SampleRate (1)
The SampleRate option can be used to control the sample rate of the result:
a1 = AudioGenerator["Sin"];
a2 = AudioGenerator["White"];AudioOverlay[{a1, a2}, SampleRate -> 22050]//AudioSampleRateRelated Guides
History
Text
Wolfram Research (2016), AudioOverlay, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioOverlay.html.
CMS
Wolfram Language. 2016. "AudioOverlay." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioOverlay.html.
APA
Wolfram Language. (2016). AudioOverlay. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioOverlay.html
BibTeX
@misc{reference.wolfram_2026_audiooverlay, author="Wolfram Research", title="{AudioOverlay}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/AudioOverlay.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_audiooverlay, organization={Wolfram Research}, title={AudioOverlay}, year={2016}, url={https://reference.wolfram.com/language/ref/AudioOverlay.html}, note=[Accessed: 13-June-2026]}