SDF's Site

You are here: start » projects » soundslicer

Page Tools

Site Tools

SoundSlicer

Allows sound files to be chopped into smaller pieces.

You can download the latest version (v0.5b) here.

Features

  • Supports:
  • Has a Graphical User Interface (TODO)
    • View of the audio time line (TODO)
    • Preview the slices (TODO)
    • Output all the files to a directory (TODO)
  • Has a command line interface
    • Slice up the audio by listing the times
    • Slice the audio up into a number of equal slices
    • Stop the output of the first and/or the last slices

Requirements

Change Log

0.5b

  • Initial Version
    • Command line tool.
    • Core library implemented

Use

Command Line Tool

The command line tool allows for the automation of slicing up audio files. Running the SoundSlicer jar on windows you'll probably need java -jar soundslicer.jar …, running on linux and mac you should be able to just chmod the jar +x and then ./soundslicer.jar …

To specify the input file you simply use the -i option, then the path to the file you wish to slice. The -o option behaves differently, because multiple files can be created use the % symbol in the filename and it'll be replaced by the slice number, starting at zero. The % symbol is not required, but if missed off and multiple files get output, each slice will overwrite the next.

Below is the help output by the tool:

usage: soundslicer.jar -c <count> | -t <time time ...> [-f] [-h] -i <file>
       [-l] -o <path> [-s | -v]
Slices an audio file into smaller files.
 -c,--slice-count <count>     The number of slices to divide the audio by.
 -f,--miss-first              Do not output the first slice.
 -h,--help                    Print this text
 -i,--in <file>               The audio file to slice.
 -l,--miss-last               Do not output the last slice
 -o,--out <path>              The output pattern, using % to denote the
                              slice number.
 -s,--silent                  Do not output anything
 -t,--times <time time ...>   The times at which the splits should occur.
 -v,--verbose                 Output with more detail
Developed by: Steven "SDF" Sulley <http://www.sdf.me.uk/>

Slicing a File into Eight

soundslicer.jar -c 8 -i myInput.wav -o out/myOutput%.wav

Use the -c option to specify the number of slices the file should be split into, in this case eight.

Slicing a File, Specifying Times

soundslicer.jar -t 10000 20000 30000 -i myInput.wav -o out/myOutput%.wav

Use the -t option to specify the times to split the slices at, in this case 10 seconds, 20 seconds and 30 seconds. Times are specified in milliseconds.

Limiting the Sound File to Ten Seconds

soundslicer.jar -t 10000 -l -i myInput.wav -o myOutput.wav

This would normally slice the file into two, using the -l option will stop the second slice getting outputted.

Limiting the Sound File to the Last Ten Seconds

soundslicer.jar -t 20000 -f -i myInput.wav -o myOutput.wav

This supposes that the file is 30 seconds long and does the same as above but not outputting the first slice using the -f option.