Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adzialocha/spectral-centroid-splitter
Splits a wav file into small fractions and sorts them after a spectral-centroid analysis
https://github.com/adzialocha/spectral-centroid-splitter
Last synced: 8 days ago
JSON representation
Splits a wav file into small fractions and sorts them after a spectral-centroid analysis
- Host: GitHub
- URL: https://github.com/adzialocha/spectral-centroid-splitter
- Owner: adzialocha
- Created: 2015-07-14T19:31:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-14T21:48:39.000Z (over 9 years ago)
- Last Synced: 2024-04-15T04:26:45.911Z (7 months ago)
- Language: Python
- Homepage:
- Size: 176 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spectral-centroid-splitter
Splits a uncompressed wav file into small fractions and sorts them after a [spectral-centroid](https://en.wikipedia.org/wiki/Spectral_centroid) analysis.
Writes fractions as wave audio file, json data for further processing and png fft analysis plot figure in specified output directory.
### Requirements
* python 2.7
* matplotlib 1.4.3
* numpy 1.9.2### Usage
```
usage: spectral-centroid-splitter.py [-h] [--duration [ms]] [--sort-grid [hz]]
[--output-dir path]
input-wav-filepositional arguments:
input-wav-file input wave file path (uncompressed)optional arguments:
-h, --help show this help message and exit
--duration [ms] duration of one wave fraction (in milliseconds)
--sort-grid [hz] sort grid after spectral analysis (in hz steps)
--output-dir path output directory path
```### Example
`python spectral-centroid-splitter.py test.wav --duration 50 --sort-grid 100`
```
Name "test"
Duration 4.595021s
Sample-Rate 16bit
Frame-Rate 48000hz
Fraction-Size-Frames 2397
Fraction-Sort-Grid 100
Fraction-Duration 0.050000s
Fractions-Count 92
```Example output file @ `./out/1300/test_out_2.png` (spectral centroid at around 1300hz)
![Example](https://github.com/marmorkuchen-net/spectral-centroid-splitter/blob/master/example.png)