Forrest logo
back to the sox tool

sox:tldr:a8594

sox: Trim an audio file to the specified times.
$ sox ${input_audiofile} ${output_audiofile} trim ${start} ${end}
try on your machine

This command uses the "sox" audio processing tool to trim a section of an input audio file and save it as an output audio file.

• "${input_audiofile}" is a placeholder for the path and name of the input audio file. • "${output_audiofile}" is a placeholder for the desired path and name of the output audio file. • "trim" is an option in sox that indicates that a section of the audio should be trimmed. • "${start}" is a placeholder for the start time (in seconds) of the section to be trimmed. • "${end}" is a placeholder for the end time (in seconds) of the section to be trimmed.

By providing the appropriate values for "${input_audiofile}", "${output_audiofile}", "${start}", and "${end}", this command will extract the specified section of audio from the input file and save it as the output file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the sox tool