Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate fCWT for a short signal to be used as feature #59

Open
prashant-saxena opened this issue Mar 26, 2024 · 2 comments
Open

Generate fCWT for a short signal to be used as feature #59

prashant-saxena opened this issue Mar 26, 2024 · 2 comments

Comments

@prashant-saxena
Copy link

Hello,
At present, I'm using MFCC as a feature in my CNN project. I'm also trying several other features to improve the prediction
factor. The input data is a mono, 16Hz wave file. The data is extracted for 0.1 seconds.

signal, sr = librosa.load("test.wav", sr=None)
fs = 1600
f0 = 1 # lowest frequency
f1 = 101 # highest frequency
fn = 20 # number of frequencies
# Calculate CWT without plotting...
freqs, out = fcwt.cwt(signal[0:1600], fs, f0, f1, fn)
print(freqs)

The above code is generating freqs with 20 points but I'm a bit confused about fs, f0, and f1. The plot looks blurry and I believe that I haven't used correct values. How do I improve the freqs to have good noise for better predictions?

@lschneiderbauer
Copy link
Contributor

You probably need to play with the sigma parameter (see the C++ example in the README). However, I don't know if the python interface exposes that option.

@fastlib
Copy link
Owner

fastlib commented Jan 6, 2025

The python interface does expose that option! Look at the 'advanced use' section in the Jupyter notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants