AudioTrim
Details and Options

- AudioTrim can be used to either extract interesting parts of a recording or remove uninteresting parts, e.g. silence.
- Intervals with amplitudes below
are assumed to be silent.
- The time t can be any of the following:
-
t time given in seconds Quantity[t,"unit"] time given in "unit" compatible with seconds Quantity[t,"Samples"] time given as number of samples - AudioTrim takes a Padding option. See the reference page for AudioPad for possible settings.
- In AudioTrim[audio,t], when t is longer than the duration of audio, by default no extra padding is introduced.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Import sound as an audio object:

https://wolfram.com/xid/09by6p7dq-effx8q
Trim the silence at the beginning and end:

https://wolfram.com/xid/09by6p7dq-xvdt7


https://wolfram.com/xid/09by6p7dq-ize6xg


https://wolfram.com/xid/09by6p7dq-hjefvp


https://wolfram.com/xid/09by6p7dq-evw1hg

Scope (3)Survey of the scope of standard use cases
Specify the amount of trimming using a time Quantity:

https://wolfram.com/xid/09by6p7dq-k3zyiy

Specify the amount of trimming using a number of samples:

https://wolfram.com/xid/09by6p7dq-d3n9pv


https://wolfram.com/xid/09by6p7dq-godsfe

Applications (1)Sample problems that can be solved with this function
Extract intervals that satisfy a condition:

https://wolfram.com/xid/09by6p7dq-fiewei

Use AudioIntervals to look for segments with high RMS amplitude:

https://wolfram.com/xid/09by6p7dq-teqzin


https://wolfram.com/xid/09by6p7dq-nje5gv

Properties & Relations (1)Properties of the function, and connections to other functions
Partition an Audio object:

https://wolfram.com/xid/09by6p7dq-46ijdn
Define the times for partitioning:

https://wolfram.com/xid/09by6p7dq-s29lzd


https://wolfram.com/xid/09by6p7dq-h4syb9

Wolfram Research (2016), AudioTrim, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioTrim.html.
Text
Wolfram Research (2016), AudioTrim, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioTrim.html.
Wolfram Research (2016), AudioTrim, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioTrim.html.
CMS
Wolfram Language. 2016. "AudioTrim." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioTrim.html.
Wolfram Language. 2016. "AudioTrim." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AudioTrim.html.
APA
Wolfram Language. (2016). AudioTrim. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioTrim.html
Wolfram Language. (2016). AudioTrim. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioTrim.html
BibTeX
@misc{reference.wolfram_2025_audiotrim, author="Wolfram Research", title="{AudioTrim}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/AudioTrim.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_audiotrim, organization={Wolfram Research}, title={AudioTrim}, year={2016}, url={https://reference.wolfram.com/language/ref/AudioTrim.html}, note=[Accessed: 26-March-2025
]}