Created
February 23, 2026 08:05
-
-
Save ducnh1022/23d2f1f70c221bed4104287b99732e8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Most compatible way – use .loc / .iat if DataFrame, indexing if ndarray | |
| loudness = float(features['loudness_sma3_amean'].item() | |
| if hasattr(features, '__getitem__') and 'loudness_sma3_amean' in features | |
| else features[smile.feature_names.index('loudness_sma3_amean')]) | |
| voicing_key = 'voicingProb_sma3nz_amean' | |
| voicing = 0.0 | |
| if voicing_key in smile.feature_names: | |
| idx = smile.feature_names.index(voicing_key) | |
| voicing = float(features[voicing_key].item() | |
| if hasattr(features, '__getitem__') and voicing_key in features | |
| else features[idx]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment