Skip to main content

A Python library for audio analysis, similar to librosa.

Project description

Audio Analysis Library

This library provides a set of tools for audio analysis, similar to librosa. It includes functionalities for audio file I/O, spectral representations, audio feature extraction, and basic audio effects.

Installation

To install the library, run the following command:

pip install audio_analysis_lib

Usage

Here are some basic examples of how to use the library:

Reading and Writing Audio

from audio_analysis.io import read_audio, write_audio

# Read an audio file
audio_data, sample_rate = read_audio('path/to/your/audio.wav')

# Write audio data to a file
write_audio(audio_data, sample_rate, 'path/to/output/audio.wav')

Spectral Representations

from audio_analysis.spectral import calculate_stft, calculate_istft

# Compute the Short-Time Fourier Transform
frequencies, times, stft_matrix = calculate_stft(audio_data, sample_rate)

# Inverse Short-Time Fourier Transform to reconstruct the audio signal
audio_data_reconstructed = calculate_istft(stft_matrix, sample_rate)

Feature Extraction

from audio_analysis.features import mfcc

# Compute Mel-frequency cepstral coefficients
mfcc_features = mfcc(audio_data, sample_rate)

Audio Effects

from audio_analysis.effects import change_pitch, time_stretch

# Change the pitch of the audio signal
pitch_shifted_audio = change_pitch(audio_data, sample_rate, semitone_shift=2)

# Stretch the time of the audio signal
stretched_audio = time_stretch(audio_data, stretch_factor=1.5)

For more detailed documentation and advanced usage, please refer to the individual module docstrings within the library.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

audio_analysis_lib-0.1.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file audio_analysis_lib-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: audio_analysis_lib-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for audio_analysis_lib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f53c143eaa75b2cf3cea002e07413776fd7fc672df25c6a65818a7a6c0a28872
MD5 b7b81b7ad7edd1665d057a3ee3a5d239
BLAKE2b-256 290b0f0419bfdc9981cd7dc3b5130498e08adec3b66b4b518c56dfa6d08b727b

See more details on using hashes here.

Supported by

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