AIWintermuteAI / Speech-to-Intent-Micro

An open-source, easily accessible package for training and deploying Speech-to-Intent models on microcontrollers and SBCs
Apache License 2.0
36 stars 7 forks source link

Unexpected Keyword Argument 'min_shift' in Data Augmentation Pipeline #6

Closed Tabrez-dev closed 6 months ago

Tabrez-dev commented 6 months ago

Hi, i have seen you have deleted the edited jupter notebook and have done some changes. I am not able to get pass this error it comes before Basic feature extractor (Vanilla Conv2D), can you check this out? Thanks

The error arises in the code when attempting to create a data augmentation pipeline (aug_pipeline) using the create_aug_pipeline() function. The function is intended to create a pipeline using the Compose class from the audiomentations library. However, it seems that there is an unexpected keyword argument min_shift being passed to the Shift augmentation. This argument is not recognized by the Shift class.

Steps to Reproduce:

  1. Attempt to create a data augmentation pipeline using the provided function create_aug_pipeline().

  2. When instantiating the Shift augmentation, an unexpected keyword argument min_shift is provided.

Expected Behavior:

The data augmentation pipeline should be created without any errors, and the Shift augmentation should accept the parameters as expected.

Actual Behavior:

An error occurs due to the unexpected keyword argument min_shift being passed to the Shift augmentation, causing a TypeError.

Note:

The issue likely requires modification of the parameters being passed to the Shift augmentation or adjustment of the audiomentations library usage to align with the available parameters.

Screenshot from 2024-04-05 18-16-49

Tabrez-dev commented 6 months ago

I changed this line: Shift(min_shift=-0.5, max_shift=0.5, p=0.1), to this: Shift(min_fraction=-0.5, max_fraction=0.5, p=0.1), and it worked!

AIWintermuteAI commented 6 months ago

Yes, the args for Shift have changed it seems. It's strange that you are encountering this problem locally though, since the version of audiomentations is pinned here https://github.com/AIWintermuteAI/Speech-to-Intent-Micro/blob/7e6674117c55145d0071d39768c183e63e917479/requirements.txt#L6 How did you install the dependencies?

Tabrez-dev commented 6 months ago

I was facing some errors when i installed dependencies through requirement.txt. it was fixed by upgrading version of audiomentations.

Also i ran the training for 75 epochs and it showed early stopping at 46th epoch. Is this expected? I believe in the youtube video you said 50 to 100 epochs are good enough. So what can i do to fix this issue?(should i create a new issue since the original issue somewhat is fixed?)

AIWintermuteAI commented 6 months ago

Okay, I guess that means that audiomentations version is not available for your platform....

training for 75 epochs and it showed early stopping at 46th epoch

No, that looks reasonable.

Tabrez-dev commented 6 months ago

What can be done to make it run for more epochs? Is more epochs necessarily improve accuracy? The model you have trained is for how many epochs?

Tabrez-dev commented 6 months ago

hello?

AIWintermuteAI commented 6 months ago

Original issue resolved, closing. @Tabrez-dev consider supporting me on Github or Patreon :)