File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ import numpy as np
2+ import openae .features
3+
4+ # generate random data
5+ rng = np .random .default_rng ()
6+ timedata = rng .normal (0 , 1 , 1024 )
7+
8+ # compute spectrum
9+ spectrum = np .fft .rfft (timedata )
10+
11+ # generate input for feature extraction algorithms
12+ input_ = openae .features .Input (
13+ samplerate = 1.0 ,
14+ timedata = timedata ,
15+ spectrum = spectrum ,
16+ )
17+
18+ # compute features
19+ print (openae .features .rms (input_ ))
20+ print (openae .features .spectral_centroid (input_ ))
21+ print (openae .features .spectral_flatness (input_ ))
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ Contents
1717 :maxdepth: 1
1818 :caption: Python
1919
20+ python/get-started
2021 python/api
2122
2223Indices and tables
Original file line number Diff line number Diff line change 1+ # Get Started
2+
3+ ## Install
4+
5+ The Python library can be easily installed with [ PyPI] ( https://pypi.org/project/openae/ ) :
6+
7+ ``` shell
8+ $ pip install openae
9+ ```
10+
11+ ## Minimal example
12+
13+ ``` {literalinclude} ../../bindings/python/examples/features_minimal.py
14+ ```
You can’t perform that action at this time.
0 commit comments