Skip to main content

Streamlit component to view wavforms and spectrogram

Project description

st-audio-spectrogram

Streamlit component that allows you to visualize wav file waveforms, and spectrograms, while playing the video.

Installation instructions

pip install st-audio-spectrogram

Usage instructions

import streamlit as st
from st_audio_spectrogram import st_audio_spectrogram

# You can also leave any of these out for default values:
config = {
    "cursor": {
        "color": "blue",
        "width": 4,
    },
    "waveform": {
        "height": 128,
        "color": "#4F4A85",
        "progressColor": '#383351',
        "normalize": True,
    },
    "spectrogram": {
        "height": 128,
        "labels": True,
    },
    "colormap": {
        "colormap": "plasma",
        "nshades": 256,
        "format": "float",
    },
    "mediaControls": True,
}

data = open("demo.wav", "rb").read()
st_audio_spectrogram(data, config=config)

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

st_audio_spectrogram-0.0.4-py3-none-any.whl (653.4 kB view details)

Uploaded Python 3

File details

Details for the file st_audio_spectrogram-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for st_audio_spectrogram-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9d53e4265d1377e323996caf3d016acde0ceb147a7ccfca4f923f4e7da589d6c
MD5 e36d9a86d5e9925a4d7e639a8156247b
BLAKE2b-256 c56fa5a718b627fdecdfd515aa4b9892c4d021932f7c6a88971cf92fa3be0802

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