SAM is a Python library for sound/audio processing in experimental psychology
Project description
Speech Analysis Module (SAM)
Speech Analysis Module is a modular Python library designed to simplify audio preprocessing, feature extraction, visualization, and recording in experimental and clinical psychology settings.
This package provides ready-to-use functions for:
Recording audio
- Compatible with USB microphones and Arduino triggers
- Includes classes for simple and Arduino-synced recordings
Preprocessing audio
- Bandpass filtering and noise gating
- Silence trimming and duration standardization
Analysis
- Onset detection
- Power spectral density (PSD) via STFT or Welch’s method
- Envelopes, frequency analysis, and energy-based features
Visualization
- Oscillograms
- Spectrograms
- PSD curves in both dB and linear scale
Features
-Integrated analysis with Praat via Parselmouth: Automatic extraction of pitch, jitter, shimmer, harmonicity (HNR), and other acoustic biomarkers from speech recordings
-Acoustic and spectral feature extraction with librosa: Includes MFCCs, spectral centroid, spectral bandwidth, spectral contrast, spectral rolloff, zero-crossing rate, RMS energy, chroma features, and tonal centroid features (tonnetz)
Structure
speech_analysis_module/
│
├── analysis/ # Core signal processing (onsets, PSD, Welch)
├── plot/ # Visualization functions (waveforms, spectrograms)
├── prepro/ # Preprocessing utilities (filters, trimming, noise gate)
├── utils/ # File I/O, transcription (Whisper), helper functions
├── psychopy/ # Recording classes for PsychoPy experiments
└── features/ # (Coming soon) Feature extraction for voice analysis
## Installation
You can install SAM directly from PyPI:
```bash
pip install speech-analysis-module
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
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 speech_analysis_module-0.0.4.tar.gz.
File metadata
- Download URL: speech_analysis_module-0.0.4.tar.gz
- Upload date:
- Size: 913.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd049edf7bbaa24fa93e16018c19286d31a1f8badfd44d672094f3e8c945d837
|
|
| MD5 |
c03344ce4cd5c0d9c4a6a581eb0ba3db
|
|
| BLAKE2b-256 |
aa5646b9ce087e90524a1239879958c9a8a315ccf4f971c5727dbb0deb7acb45
|
File details
Details for the file speech_analysis_module-0.0.4-py3-none-any.whl.
File metadata
- Download URL: speech_analysis_module-0.0.4-py3-none-any.whl
- Upload date:
- Size: 912.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31e85e3a4135132dc4ef98ddcc13a4f95e5d280380ec7d95eb9ae13c599891ad
|
|
| MD5 |
c086d0167962187cd9b1bccbcdaccfcf
|
|
| BLAKE2b-256 |
08ea4002be9d8634ec960acac057132e10976c6c2368b89dc2a3ce82e0fc9777
|