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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sead-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 834c8e562e5511d11d1115486950652e957dd9865c86b00d2c35878b00d52bdc
MD5 bbbc19a378bdef54ebcc0dba83e58870
BLAKE2b-256 76f9b83a0ede39b4bdc5d2b48a0f67833f6d9d7172e3293837c993e9f37f85e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sead-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d0e85a5891162f20b6189f4c3a4c21e32d1be7559afcb02f2328017a99bef04
MD5 bddee94d03f394dceea9a50f1a7008f8
BLAKE2b-256 f6cf73d15365f52fc09072fa57bb560b1530a50a1107e4746e39e380275e6da9

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