Skip to main content

A real-time audio time-scale modification library

Project description

Documentation Status Build Status

AudioTSM is a python library for real-time audio time-scale modification procedures, i.e. algorithms that change the speed of an audio signal without changing its pitch.

Documentation:

https://audiotsm.readthedocs.io/

Examples:

https://muges.github.io/audiotsm/

Source code repository and issue tracker:

https://github.com/Muges/audiotsm/

Python Package Index:

https://pypi.python.org/pypi/audiotsm/

License:

MIT – see the file LICENSE for details.

Installation

Audiotsm should work with python 2.7 and python 3.4+.

You can install the latest version of audiotsm with pip:

pip install audiotsm

If you want to use the gstreamer plugins, you should install PyGObject and python-gst, and use the following command to install audiotsm:

pip install audiotsm[gstreamer]

If you want to play the output of the TSM procedures in real time, or to use the examples, you should install audiotsm as follow:

pip install audiotsm[stream]

Basic usage

The audiotsm package implements several time-scale modification procedures:

  • OLA (Overlap-Add), which should only be used for percussive audio signals;

  • WSOLA (Waveform Similarity-based Overlap-Add), an amelioration of the OLA procedure which should give good results on most inputs.

If you are unsure which procedure to choose, the WSOLA should sound best in most cases. You can listen to the output of the different procedures on various audio files and at various speeds on the examples page.

Below is a basic example showing how to reduce the speed of a wav file by half using the WSOLA procedure:

from audiotsm import wsola
from audiotsm.io.wav import WavReader, WavWriter

with WavReader(input_filename) as reader:
    with WavWriter(output_filename, reader.channels, reader.samplerate) as writer:
        tsm = wsola(reader.channels, speed=0.5)
        tsm.run(reader, writer)

Thanks

If you are interested in time-scale modification procedures, I highly recommend reading A Review of Time-Scale Modification of Music Signals by Jonathan Driedger and Meinard Müller.

Project details


Download files

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

Source Distribution

audiotsm-0.1.1.tar.gz (6.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiotsm-0.1.1-py2.py3-none-any.whl (28.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file audiotsm-0.1.1.tar.gz.

File metadata

  • Download URL: audiotsm-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for audiotsm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cc0384de80d314a582b71a14d6a265ab937a6ee1f0e0dd3d79e4c1ef2de9632d
MD5 04c431e65567d088378ca8de6b9962ce
BLAKE2b-256 18c61d911abf5f1ed6d69f23c86c55bed0f06eaf030e0a8a3d52edfdb4907b83

See more details on using hashes here.

File details

Details for the file audiotsm-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for audiotsm-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3cff59576e2ef38376c10cdb13f470c1e441250f106a903aca1ecc9aea2bea98
MD5 5e6647cfa349770f001fcfacbb41864e
BLAKE2b-256 984c243b007497d770421d51dea6532f8151268824840a16791c247e7555f4b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page