Skip to main content

Audio Slice

Description

This tool slices an MP3 file in to a specified number of pieces. Using this command line tool, you can extract multiple audio files from one master file.

Current Development Status

This tool is still in its early stages and can only be described as "quick and dirty". You should be comfortable with everything that comes along with that descriptor.

Usage Dependencies

Here are the required dependencies to use this tool:

Installation

The easiest way to install this tool is to use PIP. No other method of installation is officially supported at this time.

Installing Audio Slice can be achieved by running the following command once you have PIP installed:

pip install --user audio-slice

If you're upgrading to a new version of Audio Slice, you simply use:

pip install --user audio-slice --upgrade

Usage

Recommended usage

If you're going to use this tool, the recommended usage is to do any file-renaming you have to do first, and then move on to the slicing.

File renaming

You should rename all of the files BEFORE performing any slice operations. In order to rename the files, it only works by navigating directly to the directory containing all of the files. Once you've navigated there, then you can type the following command:

slice . rename

This will rename all of the files in the directory to just their participant IDs. During the slicing process, the tags will be added on to the end of the slices.

Slicing

slice --piece <start_in_seconds> <end_in_seconds> --tags <tag>,<tag>,<tag> <filename>

Example:

slice --piece 24.3 34.1 --piece 35.3 41.2 --tags pig,book never_gonna_give_you_up.mp3

A few things to note about using the tool:

  1. You can create as many slices of the audio as you need to; even if they overlap. You simply need to add another --piece <start> <end> option to the command line.
  2. The tool will place the output files in the same directory as the input file.
  3. You specify the start and end of a slice in seconds that can include greater precision. (Ex: 74.3)
  4. Currently, this only works with MP3s.

Problems

The following are known solutions to problems that have been raised:

slice command not found

If you're having a problem executing the slice command at the command line, your Python binary folder may not be in your PATH. If you need to add the Python binary directory to your PATH, you can do the following (MacOS only):

echo 'export PATH="$PATH:~/Library/Python/2.7/bin"' >> ~/.bash_profile
source ~/.bash_profile

Metadata

Release files for audio-slice 0.0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audio-slice 0.0.6.2
File Size Uploaded
audio-slice-0.0.6.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audio-slice 0.0.6.2
File Interpreter ABI Platform
audio_slice-0.0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / audio-slice-0.0.6.2.tar.gz

Download URL audio-slice-0.0.6.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
395385811e2c538501aba9dae78dc7ba29e659d7229e6efb685dab920ef666d9
BLAKE2b-256 checksum
How to use checksums
4dd2a6cd6aed517fe6d40f16e690ce88cc0e5fd92547af2df1394b9e8851feaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

Release files / audio_slice-0.0.6.2-py3-none-any.whl

Download URL audio_slice-0.0.6.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4ebcf74b363d67816f55eef83ed6f4b503ad4e8e97678d5a8c446783ee1fa6a
BLAKE2b-256 checksum
How to use checksums
c8cdda91640a440bba2df10e816be5f72db1fbf4b499c332a0638cf047f8f7ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.0.6.2 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page