Skip to content

Commit 3bd21a2

Browse files
authored
Merge pull request #54 from SuperKogito/last-tweaks-for-v0.2.1
fix docs & version and update accordingly
2 parents 3b9b51d + afbe42e commit 3bd21a2

21 files changed

+47
-33
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## v0.3.0
4+
- improve code based on Joss reviewers recommendations.
5+
- add type hinting.
6+
- fix documentation typos.
7+
38
## v0.2.0
49
- add spectrogram implementations.
510
- add predefined filter banks input to the spafe features functions for faster batch processing.

CONTRIBUTING.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ The preferred way to contribute to spafe is to fork the [main repository](https:
3939

4040
5. Start making changes.
4141

42-
\`\``diff
43-
44-
- Please never work directly on the `master` branch!\`\`\`
42+
```diff
43+
-> Please never work directly on the `master` branch!
44+
```
4545

4646
6. Once you are done, make sure to format the code using black to fit spafe's codestyle.
4747

48-
\`\``black spafe/\`\`\`
48+
```black spafe/```
4949

5050
7. Make sure that the tests succeed and have enough coverage.
5151

52-
\`\``pytest -x --cov-report term-missing --cov=spafe spafe/tests/test_*.py \`\`\`
52+
```pytest -x --cov-report term-missing --cov=spafe spafe/tests/test_*.py ```
5353

5454
8. Use Git for the to do the version controlling of this copy. When you're done editing, you know the drill `add`, `commit` then `push`:
5555

@@ -111,7 +111,6 @@ we use Github issues to track all bugs and feature requests. In the case of comi
111111
import spafe
112112
import platform
113113

114-
115114
print(platform.platform())
116115
print("Python", sys.version)
117116
print("NumPy", numpy.__version__)

docs/source/_static/switcher.json

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
[
2+
{
3+
"name": "dev",
4+
"version": "dev",
5+
"url": "https://superkogito.github.io/spafe/v0.3.0/index.html"
6+
},
7+
{
8+
"name": "v0.3.0",
9+
"version": "0.3.0",
10+
"url": "https://superkogito.github.io/spafe/v0.3.0/index.html"
11+
},
212
{
313
"name": "v0.2.0",
414
"version": "0.2.0",

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
html_favicon = "_static/favicon_io/favicon.ico"
2626

2727
# The short X.Y version
28-
version = "0.2.0"
28+
version = "0.3.0"
2929
# The full version, including alpha/beta/rc tags
30-
release = "0.2.0"
30+
release = "0.3.0"
3131

3232
# -- General configuration ---------------------------------------------------
3333

paper/paper.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bibliography: paper.bib
1717
---
1818

1919
# Summary
20-
This paper describes version 0.2.0 of spafe: a python package for audio features extraction based on the Numpy [@numpy:2020] and Scipy [@scipy:2019] libraries.
20+
This paper describes version 0.3.0 of spafe: a python package for audio features extraction based on the Numpy [@numpy:2020] and Scipy [@scipy:2019] libraries.
2121
Spafe implements various features extraction techniques that can be used to solve a wide variety of recognition and classification tasks (speaker verification, spoken emotion recognition, spoken language identification etc.).
2222
The paper provides a brief overview of the library’s structure, theory and functionalities.
2323

paper/paper.pdf

-13.6 KB
Binary file not shown.

spafe/features/bfcc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def bark_spectrogram(
114114
from scipy.io.wavfile import read
115115
116116
# read audio
117-
fpath = "../../../data/test.wav"
117+
fpath = "../../../tests/data/test.wav"
118118
fs, sig = read(fpath)
119119
120120
# compute bark spectrogram
@@ -272,7 +272,7 @@ def bfcc(
272272
from spafe.utils.vis import show_features
273273
274274
# read audio
275-
fpath = "../../../data/test.wav"
275+
fpath = "../../../tests/data/test.wav"
276276
fs, sig = read(fpath)
277277
278278
# compute bfccs

spafe/features/cqcc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def cqt_spectrogram(
8686
from scipy.io.wavfile import read
8787
8888
# read audio
89-
fpath = "../../../data/test.wav"
89+
fpath = "../../../tests/data/test.wav"
9090
fs, sig = read(fpath)
9191
9292
# compute spectrogram
@@ -243,7 +243,7 @@ def cqcc(
243243
from spafe.utils.vis import show_features
244244
245245
# read audio
246-
fpath = "../../../data/test.wav"
246+
fpath = "../../../tests/data/test.wav"
247247
fs, sig = read(fpath)
248248
249249
# compute cqccs

spafe/features/gfcc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def erb_spectrogram(
9191
from scipy.io.wavfile import read
9292
9393
# read audio
94-
fpath = "../../../data/test.wav"
94+
fpath = "../../../tests/data/test.wav"
9595
fs, sig = read(fpath)
9696
9797
# compute erb spectrogram
@@ -258,7 +258,7 @@ def gfcc(
258258
from spafe.utils.vis import show_features
259259
260260
# read audio
261-
fpath = "../../../data/test.wav"
261+
fpath = "../../../tests/data/test.wav"
262262
fs, sig = read(fpath)
263263
264264
# compute mfccs and mfes

spafe/features/lfcc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def linear_spectrogram(
8484
from scipy.io.wavfile import read
8585
8686
# read audio
87-
fpath = "../../../data/test.wav"
87+
fpath = "../../../tests/data/test.wav"
8888
fs, sig = read(fpath)
8989
9090
# compute spectrogram
@@ -230,7 +230,7 @@ def lfcc(
230230
from spafe.utils.vis import show_features
231231
232232
# read audio
233-
fpath = "../../../data/test.wav"
233+
fpath = "../../../tests/data/test.wav"
234234
fs, sig = read(fpath)
235235
236236
# compute lfccs

spafe/features/lpc.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def lpc(
136136
from spafe.utils.vis import show_features
137137
138138
# read audio
139-
fpath = "../../../data/test.wav"
139+
fpath = "../../../tests/data/test.wav"
140140
fs, sig = read(fpath)
141141
142142
# compute lpcs
@@ -276,7 +276,7 @@ def lpcc(
276276
from spafe.utils.vis import show_features
277277
278278
# read audio
279-
fpath = "../../../data/test.wav"
279+
fpath = "../../../tests/data/test.wav"
280280
fs, sig = read(fpath)
281281
282282
# compute lpccs

spafe/features/mfcc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def mel_spectrogram(
9292
from scipy.io.wavfile import read
9393
9494
# read audio
95-
fpath = "../../../data/test.wav"
95+
fpath = "../../../tests/data/test.wav"
9696
fs, sig = read(fpath)
9797
9898
mSpec, _ = mel_spectrogram(sig,
@@ -253,7 +253,7 @@ def mfcc(
253253
from spafe.utils.vis import show_features
254254
255255
# read audio
256-
fpath = "../../../data/test.wav"
256+
fpath = "../../../tests/data/test.wav"
257257
fs, sig = read(fpath)
258258
259259
# compute mfccs and mfes
@@ -403,7 +403,7 @@ def imfcc(
403403
from spafe.utils.vis import show_features
404404
405405
# read audio
406-
fpath = "../../../data/test.wav"
406+
fpath = "../../../tests/data/test.wav"
407407
fs, sig = read(fpath)
408408
409409
# compute mfccs and mfes

spafe/features/msrcc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def msrcc(
104104
from spafe.utils.vis import show_features
105105
106106
# read audio
107-
fpath = "../../../data/test.wav"
107+
fpath = "../../../tests/data/test.wav"
108108
fs, sig = read(fpath)
109109
110110
# compute msrccs

spafe/features/ngcc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def ngcc(
107107
from spafe.utils.vis import show_features
108108
109109
# read audio
110-
fpath = "../../../data/test.wav"
110+
fpath = "../../../tests/data/test.wav"
111111
fs, sig = read(fpath)
112112
113113
# compute ngccs

spafe/features/pncc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def pncc(
369369
from spafe.utils.vis import show_features
370370
371371
# read audio
372-
fpath = "../../../data/test.wav"
372+
fpath = "../../../tests/data/test.wav"
373373
fs, sig = read(fpath)
374374
375375
# compute pnccs

spafe/features/psrcc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def psrcc(
110110
from spafe.utils.vis import show_features
111111
112112
# read audio
113-
fpath = "../../../data/test.wav"
113+
fpath = "../../../tests/data/test.wav"
114114
fs, sig = read(fpath)
115115
116116
# compute psrccs

spafe/features/rplp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def plp(
254254
from spafe.utils.vis import show_features
255255
256256
# read audio
257-
fpath = "../../../data/test.wav"
257+
fpath = "../../../tests/data/test.wav"
258258
fs, sig = read(fpath)
259259
260260
# compute plps
@@ -367,7 +367,7 @@ def rplp(
367367
from spafe.utils.vis import show_features
368368
369369
# read audio
370-
fpath = "../../../data/test.wav"
370+
fpath = "../../../tests/data/test.wav"
371371
fs, sig = read(fpath)
372372
373373
# compute rplps

spafe/features/spfeats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def extract_feats(sig: np.ndarray, fs: int, nfft: int = 512) -> SpectralFeats:
302302
from pprint import pprint
303303
304304
# read audio
305-
fpath = "../../../data/test.wav"
305+
fpath = "../../../tests/data/test.wav"
306306
fs, sig = read(fpath)
307307
308308
# compute erb spectrogram

spafe/frequencies/dominant_frequencies.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def get_dominant_frequencies(
7171
win_hop = 0.010
7272
7373
# read audio
74-
fpath = "../../../data/test.wav"
74+
fpath = "../../../tests/data/test.wav"
7575
fs, sig = read(fpath)
7676
7777
# compute dominant frequencies
@@ -83,7 +83,7 @@ def get_dominant_frequencies(
8383
nfft=nfft,
8484
win_len=win_len,
8585
win_hop=win_hop,
86-
win_type: WindowType="hamming")
86+
win_type="hamming")
8787
8888
# compute FFT, Magnitude, Power spectra
8989
fourrier_transform = np.absolute(np.fft.fft(sig, nfft))

spafe/frequencies/fundamental_frequencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def compute_yin(
177177
178178
179179
# read audio
180-
fpath = "../../../data/test.wav"
180+
fpath = "../../../tests/data/test.wav"
181181
fs, sig = read(fpath)
182182
duration = len(sig) / fs
183183
harmonic_threshold = 0.85

spafe/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
For a copy, see <https://github.com/SuperKogito/spafe/blob/master/LICENSE>.
77
88
"""
9-
__version__ = "0.2.0"
9+
__version__ = "0.3.0"

0 commit comments

Comments
 (0)