Create feature_params.joblib
Browse files- feature_params.joblib +21 -0
feature_params.joblib
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import joblib
|
| 2 |
+
|
| 3 |
+
# These should match what you used in training
|
| 4 |
+
feature_params = {
|
| 5 |
+
'max_pad_len': 174, # From your extract_features() function
|
| 6 |
+
'sample_rate': 22050, # Common default, adjust if you used different
|
| 7 |
+
'n_mfcc': 40, # From your MFCC extraction
|
| 8 |
+
'augmentation_config': { # From your augmentation setup
|
| 9 |
+
'add_noise': True,
|
| 10 |
+
'time_shift': True,
|
| 11 |
+
'pitch_shift': True,
|
| 12 |
+
'time_stretch': True,
|
| 13 |
+
'volume_change': True,
|
| 14 |
+
'background_noise': True,
|
| 15 |
+
'freq_mask': True,
|
| 16 |
+
'time_mask': True
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
joblib.dump(feature_params, "feature_params.joblib")
|
| 21 |
+
print("Feature parameters saved.")
|