streamsad
streamsad is a streaming-oriented Speech Activity Detection (SAD) module that operates frame by frame, without requiring access to the full audio signal (unlike batch processing). Unlike simple energy-based Voice Activity Detection (VAD), it accurately detects human speech while ignoring music, background noise, and silence. Powered by an efficient ONNX model and a post-processing algorithm inspired by WebRTC (using ring buffer smoothing), it runs entirely on the CPU with minimal overhead, making it ideal for real-time voice interfaces, ASR frontends, and low-resource deployments.
Dependencies
This module has been tested and works correctly with Python 3.10 through 3.13.
The following third-party dependencies are required to use streamsad:
numpyonnxruntime
How to Use
Here is an example of how to use the streamsad module:
import numpy as np
from streamsad import SAD
# Initialize the SAD model
sad = SAD()
# Create an example audio stream (e.g., 2 seconds of random audio at 16kHz)
audio_np_array = np.random.randn(32000).astype(np.float32)
# Detect speech segments
segments = sad(audio_np_array)
# Print the detected segments
print(segments)
Installation
You can install streamsad using pip:
pip install streamsad
Testing
After installing the module, you can run unit tests using pytest:
pytest -s tests/test_sad.py
Metadata
Release files for streamsad 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| streamsad-0.1.4.tar.gz | 258.9 kB | Without provenance | Details for streamsad-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamsad-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for streamsad-0.1.4-py3-none-any.whl |
Total release size: 515.1 kB
Release files / streamsad-0.1.4.tar.gz
| Download URL | streamsad-0.1.4.tar.gz |
|---|---|
| Size | 258.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03667957be027c340e5cf59dfa34725da65d85964f1d900a1e9ae745551ab961
|
|
BLAKE2b-256 checksum How to use checksums |
d104fa395fc3476be8415846a0d4c8153c33077b92ed4c2df90f316d6787b33e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / streamsad-0.1.4-py3-none-any.whl
| Download URL | streamsad-0.1.4-py3-none-any.whl |
|---|---|
| Size | 256.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3584a18de6506bb07d59f481aa89621ca42fb56c4cc60f6dccd305549719524
|
|
BLAKE2b-256 checksum How to use checksums |
3d329796f6526854a3e26460ec51b9f64250dbba205c6784607518918ff9b10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Security for streamsad 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.