Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

chunks up audio

Project Description


Given an audio file, and a tab delimited file, split up audio file into smaller chunks.

Requirements & Caveats

trim: End position is after expected end of audio.
trim: Last 1 position(s) not reached.


pip install chunkup

After installing chunkup, the chunkup command line script should be added to your path, and should be available from anywhere. Test it out by opening a new terminal and running

chunkup -h


This usage example pulls down Episode #20: I Want to Break Free of Reply All. The mp3 is 41.5M. You can get replyallcreak.txt from

curl -L -o examples/reply_all_podcast.mp3
mkdir chunks

chunkup examples/reply_all_podcast.mp3 examples/replyallcreak.txt chunks/

Chunk naming

chunks/ now contains 104 chunks of speech I annotated, largely to separate out the three speakers in the first segment. The default naming conventions of chunks are:


Where [n] is the numeric index of the chunk, [basename] is the base name of the original soundfile, [col1] is the value from column 1 in replyallcreak.txt (in this case, speaker ID), and [col3] is the value from column 3 in replyallcreak.txt (in this case, the onset time of the chunk in Available variables for naming chunks are:

naming variable description
[n] chunk number
[basename] base name of original audio file
[col0-9] value from any the given column in the chunk file


You can change the chunk naming convention either at the command line usig the -n or --naming flag.

$ chunkup -n [col1]-[n].wav examples/reply_all_podcast.mp3 examples/replyallcreak.txt chunks/

Other config options include

option description
-s, --start Column index (starting with 1) for the start time, in format
-e, --end Column index (starting with 1) for the end time, in format
--header Include if chunk file has a header

All config options can be defined in a config file and passed to with the prefix +. A sample config file for this data would be:


If saved to config.txt, it could be passed to like so:

$ chunkup +config.txt examples/reply_all_podcast.mp3 examples/replyallcreak.txt chunks/

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.6 kB) Copy SHA256 Hash SHA256
Source None Apr 19, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers