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.1.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.1-py3-none-any.whl (7.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sead-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 aa60a0df28fe5de32641ed27d83ad22dfed0d2369a2341e57a258be6753d5ed1
MD5 34f72437ae949cbf33ec456cb4e599c3
BLAKE2b-256 5f9ea3ebcca2c1f85198f1d598f3bd30ee36aa24f4b2b1767595131fb627bf74

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sead-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 28948fa5741994231e904fea3de7c9381a951f17f104780652bb3930e6b67e17
MD5 c1118bba4fe1c58b098594ee1725f413
BLAKE2b-256 285658c1b84a1aaea4d3c8dfa55181c6446c09deadfa430d115ad9d0f0a2bf0c

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