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.1.1.tar.gz (14.0 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.1.1-py3-none-any.whl (14.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sead-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d20abd0c8502f54b627e56b4879b552c482f6450c4b749a96813f3ac0844d36b
MD5 f0cad7ec792c93c923550ca0ef6cf18a
BLAKE2b-256 83cb5c182719ba3f5d761ac9086741e3d226f633c72fd0c97946049e577ed0ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sead-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.0 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 237a59645794e469df5d054b1c30adb167d7dd1943f2e406f6cd61bf7f84ddf1
MD5 1874c5fa7a8473ee756183424167c752
BLAKE2b-256 28e871b99d2984d54cface29f6153abc98350dadd2cbcf1b573fed381edcfb77

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