Skip to content

Commit

Permalink
Merge pull request #54 from SuperKogito/last-tweaks-for-v0.2.1
Browse files Browse the repository at this point in the history
fix docs & version and update accordingly
  • Loading branch information
SuperKogito authored Jan 2, 2023
2 parents 3b9b51d + afbe42e commit 3bd21a2
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 33 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.3.0
- improve code based on Joss reviewers recommendations.
- add type hinting.
- fix documentation typos.

## v0.2.0
- add spectrogram implementations.
- add predefined filter banks input to the spafe features functions for faster batch processing.
Expand Down
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ The preferred way to contribute to spafe is to fork the [main repository](https:

5. Start making changes.

\`\``diff

- Please never work directly on the `master` branch!\`\`\`
```diff
-> Please never work directly on the `master` branch!
```

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

\`\``black spafe/\`\`\`
```black spafe/```

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

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

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`:

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


print(platform.platform())
print("Python", sys.version)
print("NumPy", numpy.__version__)
Expand Down
10 changes: 10 additions & 0 deletions docs/source/_static/switcher.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"name": "dev",
"version": "dev",
"url": "https://superkogito.github.io/spafe/v0.3.0/index.html"
},
{
"name": "v0.3.0",
"version": "0.3.0",
"url": "https://superkogito.github.io/spafe/v0.3.0/index.html"
},
{
"name": "v0.2.0",
"version": "0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
html_favicon = "_static/favicon_io/favicon.ico"

# The short X.Y version
version = "0.2.0"
version = "0.3.0"
# The full version, including alpha/beta/rc tags
release = "0.2.0"
release = "0.3.0"

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bibliography: paper.bib
---

# Summary
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.
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.
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.).
The paper provides a brief overview of the library’s structure, theory and functionalities.

Expand Down
Binary file modified paper/paper.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions spafe/features/bfcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def bark_spectrogram(
from scipy.io.wavfile import read
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute bark spectrogram
Expand Down Expand Up @@ -272,7 +272,7 @@ def bfcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute bfccs
Expand Down
4 changes: 2 additions & 2 deletions spafe/features/cqcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def cqt_spectrogram(
from scipy.io.wavfile import read
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute spectrogram
Expand Down Expand Up @@ -243,7 +243,7 @@ def cqcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute cqccs
Expand Down
4 changes: 2 additions & 2 deletions spafe/features/gfcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def erb_spectrogram(
from scipy.io.wavfile import read
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute erb spectrogram
Expand Down Expand Up @@ -258,7 +258,7 @@ def gfcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute mfccs and mfes
Expand Down
4 changes: 2 additions & 2 deletions spafe/features/lfcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def linear_spectrogram(
from scipy.io.wavfile import read
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute spectrogram
Expand Down Expand Up @@ -230,7 +230,7 @@ def lfcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute lfccs
Expand Down
4 changes: 2 additions & 2 deletions spafe/features/lpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def lpc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute lpcs
Expand Down Expand Up @@ -276,7 +276,7 @@ def lpcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute lpccs
Expand Down
6 changes: 3 additions & 3 deletions spafe/features/mfcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def mel_spectrogram(
from scipy.io.wavfile import read
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
mSpec, _ = mel_spectrogram(sig,
Expand Down Expand Up @@ -253,7 +253,7 @@ def mfcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute mfccs and mfes
Expand Down Expand Up @@ -403,7 +403,7 @@ def imfcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute mfccs and mfes
Expand Down
2 changes: 1 addition & 1 deletion spafe/features/msrcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def msrcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute msrccs
Expand Down
2 changes: 1 addition & 1 deletion spafe/features/ngcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def ngcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute ngccs
Expand Down
2 changes: 1 addition & 1 deletion spafe/features/pncc.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def pncc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute pnccs
Expand Down
2 changes: 1 addition & 1 deletion spafe/features/psrcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def psrcc(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute psrccs
Expand Down
4 changes: 2 additions & 2 deletions spafe/features/rplp.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def plp(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute plps
Expand Down Expand Up @@ -367,7 +367,7 @@ def rplp(
from spafe.utils.vis import show_features
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute rplps
Expand Down
2 changes: 1 addition & 1 deletion spafe/features/spfeats.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def extract_feats(sig: np.ndarray, fs: int, nfft: int = 512) -> SpectralFeats:
from pprint import pprint
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute erb spectrogram
Expand Down
4 changes: 2 additions & 2 deletions spafe/frequencies/dominant_frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_dominant_frequencies(
win_hop = 0.010
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
# compute dominant frequencies
Expand All @@ -83,7 +83,7 @@ def get_dominant_frequencies(
nfft=nfft,
win_len=win_len,
win_hop=win_hop,
win_type: WindowType="hamming")
win_type="hamming")
# compute FFT, Magnitude, Power spectra
fourrier_transform = np.absolute(np.fft.fft(sig, nfft))
Expand Down
2 changes: 1 addition & 1 deletion spafe/frequencies/fundamental_frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def compute_yin(
# read audio
fpath = "../../../data/test.wav"
fpath = "../../../tests/data/test.wav"
fs, sig = read(fpath)
duration = len(sig) / fs
harmonic_threshold = 0.85
Expand Down
2 changes: 1 addition & 1 deletion spafe/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
For a copy, see <https://github.com/SuperKogito/spafe/blob/master/LICENSE>.
"""
__version__ = "0.2.0"
__version__ = "0.3.0"

0 comments on commit 3bd21a2

Please sign in to comment.