Skip to main content

Sound Event Activity Detection (SEAD) - speech, music, others

Project description

SEAD - Sound Event Activity Detection

Sound Event Activity Detection (SEAD). Detects speech, music, and other sounds in audio with offline and streaming support.

Installation

pip install sead

For microphone streaming, also install the optional sounddevice dependency:

pip install sead[dev]

For GPU inference (optional):

pip install sead[onnx-gpu]

Usage

CLI

# Offline: process a WAV file
sead --audio audio_16khz.wav

# Or via Python module
python -m sead.cli --audio audio_16khz.wav

# Synthetic streaming: feed file as streaming input (emits start/end events)
sead --stream-file audio_16khz.wav

# Compare streaming vs offline
sead --stream-file audio_16khz.wav --compare

# Live microphone streaming (requires sounddevice)
sead --stream

# Save debug chunks for each segment
sead --audio audio_16khz.wav --debug-dir debug_segments

Python API

from sead import DEFAULT_MODEL_PATH, SEADDetector, SEADIterator, Segment
from pathlib import Path

# Offline
detector = SEADDetector(DEFAULT_MODEL_PATH)
segments = detector.process_file(Path("audio.wav"))
for s in segments:
    print(s)  # [start_time, end_time, label, confidence]

# Streaming (incremental events)
iterator = SEADIterator(detector)
for chunk in audio_chunks:
    for e in iterator(chunk):
        print(e)  # {'start': t, 'label': str} or {'end': t, 'label': str, 'confidence': float}
for e in iterator.flush():
    print(e)

Output

  • Segments: [start_time, end_time, label, confidence] with labels speech, music, others
  • Events (streaming): {'start': t, 'label': str} on onset, {'end': t, 'label': str, 'confidence': float} on offset

Acknowledgement

SEAD uses YamNet by Qualcomm, an audio event classifier trained on the AudioSet dataset.

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

sead-0.2.0.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

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

sead-0.2.0-py3-none-any.whl (7.1 MB view details)

Uploaded Python 3

File details

Details for the file sead-0.2.0.tar.gz.

File metadata

  • Download URL: sead-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sead-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ad7340a6ab0a28252fc46735f6e5a5c7f9487137eb95d63a03750636c9530b0a
MD5 25401d21d0fef4d2a280a764070f3fc5
BLAKE2b-256 2cd7df2a793cbbc054a2d8e6ceb845af7957d6c8dec290964e2be9eb7aa7e432

See more details on using hashes here.

File details

Details for the file sead-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sead-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sead-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18debc14c392c8bba8a852d90e3ad3fa34e0884405be9cf8a1d4d4ec389950dc
MD5 7eb124a58a80bf7562f8f4325f8d9acf
BLAKE2b-256 d6494c5328abddbfcc26021e59f9b36307534e56f58bd6a0a8e7510793a93ce6

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