Skip to main content

audio-snippets

Install

pip install audio-snippets

Usage

I suggest you use jupyter notebooks to take full advantage of all functions

Load Audio

from audio_snippets import Sound
s = Sound.from_path('/path/to/audio/file.mp3')

Data

print(s.audio) # just the numpy array :D
print(s.Fs)    # sampling frequency

Play it

s.play()
s.play(x=5)    # play the audio in 5x speed

Size of audio

len(s)         # Number of samples
s.size         # Number of seconds of audio
s.formatted_size 
# length of the audio in seconds/minutes/hours
# E.g.  # 5.323 seconds ; 6.43 minutes ; 1.53 hours

Slice the audio

t = s[3:5]     # Slices the audio from 3 to 5 seconds
t.play()
t = s[:5]      # Slice first 5 seconds
t = s[5:]      # Slice from 5 seconds onward
t = s[::2]     # select every second sample (speeds the audio by 2x)

Plot the waveform

s.plot()             # interactive plotly
s.plot(slice(5, 25)) # plot a slice of the waveform

Metadata

Release files for audio-snippets 0.0.1

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-snippets 0.0.1
File Size Uploaded Provenance Actions
audio_snippets-0.0.1.tar.gz 11.7 kB Without provenance Details for audio_snippets-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for audio-snippets 0.0.1
File Interpreter ABI Platform Actions
audio_snippets-0.0.1-py3-none-any.whl Python 3 none any Details for audio_snippets-0.0.1-py3-none-any.whl

Total release size: 21.4 kB

Release files / audio_snippets-0.0.1.tar.gz

Download URL audio_snippets-0.0.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1d6c862d158f9007636f0bdbc5304f4e5b372b14e05ae10867493cd6be843be1
BLAKE2b-256 checksum
How to use checksums
10f1f7017383151f4930090fd9dc91ec31561d5c965d0da6f02496c945bd7889
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.9

Release files / audio_snippets-0.0.1-py3-none-any.whl

Download URL audio_snippets-0.0.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a5ab66eab9205438a902d138f5289611ea630953160f9c84fd77877de608325
BLAKE2b-256 checksum
How to use checksums
5a594da7f0952ece220ffe354df2f9ce561b30f48eb9446f014e9a607cbece37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.9

Security for audio-snippets 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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