Paralinguistic Event Classification from Diarized Speaker Segments
Project description
PEC-DSS 🎵🔊
Paralinguistic Event Classification from Diarized Speaker Segments
PEC-DSS is an advanced audio analysis system that identifies paralinguistic vocal events (like laughter, sighs, etc.) and attributes them to specific speakers through sophisticated speaker diarization and neural audio processing.
✨ Features
- 🎙️ Advanced speaker identification using neural audio encoders
- 😀 Attribution of paralinguistic events to specific speakers
- 🔍 High-accuracy SNAC (Scalable Neural Audio Codec) model integration
- 🔊 Voice embedding and similarity-based speaker matching
- 📊 Comprehensive audio codebook analysis
- 🔄 Modular architecture for easy customization
🚀 Installation
From PyPI
pip install pec-dss
From Source with pip
git clone https://github.com/hwk06023/PEC-DSS.git
cd PEC-DSS
pip install -e .
From Source with requirements.txt
git clone https://github.com/hwk06023/PEC-DSS.git
cd PEC-DSS
pip install -r requirements.txt
For development:
pip install -r requirements-dev.txt
📖 Quick Start
Basic Usage
from snac_model import load_snac_model
from audio_encoder import get_codebook_vectors
from speaker_identification import assign_speakers_to_laughs
import librosa
# Load SNAC model
snac_model = load_snac_model(device="cpu") # or "cuda" for GPU
# Prepare speaker reference samples
speaker_samples = {
"speaker1": [audio1, audio2], # Audio waveforms as numpy arrays
"speaker2": [audio3, audio4]
}
# Process unidentified audio events
unidentified_events = [event1, event2] # Audio waveforms as numpy arrays
# Identify speakers for each audio event
results = assign_speakers_to_laughs(speaker_samples, unidentified_events, snac_model)
# Print results
for speaker, events in results.items():
print(f"Speaker {speaker} has {len(events)} attributed events")
🧩 System Architecture
PEC-DSS consists of the following components:
- snac_model.py: SNAC model initialization and management
- audio_encoder.py: Audio encoding and vectorization
- codebook_analysis.py: Statistical analysis of audio codebooks
- speaker_identification.py: Speaker identification algorithms
- main.py: Integration and execution framework
🔊 Audio Event Types
The system can identify various paralinguistic events including:
- Laughter
- Sighs
- Crying
- Coughing
- Other non-verbal vocal expressions
🚀 Future Developments
- 🧠 Integration with more audio encoder models
- 😢 Expanded paralinguistic event recognition
- 🎵 Emotional tone classification
- ⚡ Performance optimization for real-time processing
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the GNU General Public License v3.0.
🙏 Acknowledgements
- SNAC - Scalable Neural Audio Codec
- HuggingFace Transformers - Machine learning tools
- Llama - Language models for text processing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pec_dss-0.1.0.tar.gz.
File metadata
- Download URL: pec_dss-0.1.0.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d8e2f3e89a94e2790d3498b99b8b55ad94f95f4674d70682654c4cd8d48272
|
|
| MD5 |
81c0f6d3b9b0dc28523d822eee6d1a81
|
|
| BLAKE2b-256 |
d33dcfa219f048af270614501b92477f48d6709c17782e3fabfd815ff9369693
|
File details
Details for the file pec_dss-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pec_dss-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ce0eeb76dc0de109202dfc8bf27a2a9d3d8adebfec287f10aab1dde861c71a
|
|
| MD5 |
1cca9f6ec0aac601c01485b73f72aec0
|
|
| BLAKE2b-256 |
3934e7b12f315d8c404620371c23c54af26d2024a5ff52cc13be88d525b27cb8
|