-
Notifications
You must be signed in to change notification settings - Fork 26
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
onset_detect() takes 0 positional arguments but 2 were given. #15
Comments
Hi @dimsumham. I'm not actively involved with the development of this package, but it looks like we didn't specify the required version of the librosa dependency when this package was first written (about 5 years ago) and since then it appears that librosa's API has changed. We have a private version of this repository which we use, and I see that there is a specific set of dependencies that we install for it. You could try and install a specific version of the dependencies with
and see if this works. However, if the version of python that you have doesn't have windows versions of these specific dependencies then you may not be able to install them. Unfortunately I'm unable to help if this is the case. Best of luck. |
Hi @alastair , thank you very much for taking the time to answer. I will give this a try. |
You can try to name arguments to be keyword-only.
|
Thanks! Will give a trySent from my iPhoneOn Sep 10, 2023, at 3:37 PM, LuizVSilva ***@***.***> wrote:
You can try to name arguments to be keyword-only.
For example, you can specify in timbra_util.py and Timbral_hardness.py (or other files with same error) function call's:
audio_samples to y=audio_samples
fs to sr=fs
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I'm running into an error as soon as I try to run it, using the sample code given in your readme.
code:
import timbral_models
frame = r"Downloads\Ingentia60.mp3"
timbre = timbral_models.timbral_extractor(frame)
print(timbre)
error:
Calculating hardness...
Traceback (most recent call last):
File "C:\Users\andre\OneDrive\VSCode\transcribeapp\timbre.py", line 4, in
timbre = timbral_models.timbral_extractor(frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\timbral_models\Timbral_Extractor.py", line 70, in timbral_extractor
hardness = timbral_hardness(audio_samples, fs=fs,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\timbral_models\Timbral_Hardness.py", line 87, in timbral_hardness
original_onsets = timbral_util.calculate_onsets(audio_samples, envelope, fs, nperseg=nperseg)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\timbral_models\timbral_util.py", line 642, in calculate_onsets
onsets = librosa.onset.onset_detect(audio_samples, fs, backtrack=True, units='samples')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: onset_detect() takes 0 positional arguments but 2 positional arguments (and 2 keyword-only arguments) were given
The text was updated successfully, but these errors were encountered: