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.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: audio_analysis_lib-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d26534cb829423033d26d8ece97ee5fd7caa5908484cc3e4df5e36071a789e74
MD5 5b70374ddd58b4bf5aac057b489291ef
BLAKE2b-256 1a805880e65d143102511a5900e745d4c552419fb3ed1c2de84f1be26e84d0ed

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