Spaces:
Runtime error
Runtime error
File size: 1,503 Bytes
381c43b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# Spectral features
DEFAULT_SPECTRAL_FEATURES = [
'spectral_centroid',
'spectral_bandwidth',
'spectral_contrast',
'spectral_flatness',
'spectral_rolloff',
'zero_crossing_rate',
'mfccs',
'chroma_stft',
'spectral_flux'
]
ALL_SPECTRAL_FEATURES = [
'spectral_centroid',
'spectral_bandwidth',
'spectral_contrast',
'spectral_flatness',
'spectral_rolloff',
'zero_crossing_rate',
'mfccs',
'chroma_stft',
'spectral_flux'
]
# Prosodic features
DEFAULT_PROSODIC_FEATURES = ['f0', 'energy', 'speaking_rate', 'pauses', 'formants']
ALL_PROSODIC_FEATURES = ['f0', 'energy', 'speaking_rate', 'pauses', 'formants']
# Voice Quality Features
DEFAULT_VOICE_QUALITY_FEATURES = [
'jitter',
'shimmer',
'hnr',
'speech_rate'
]
ALL_VOICE_QUALITY_FEATURES = [
'jitter_local',
'jitter_rap',
'jitter_ppq5',
'shimmer_local',
'shimmer_apq3',
'shimmer_apq5',
'shimmer_dda',
'hnr',
'voicedcount',
'npause',
'intensity_duration',
'speakingrate',
'articulationrate',
'asd',
'totalpauseduration'
]
# Default features to extract
DEFAULT_FEATURES = {
'spectral': DEFAULT_SPECTRAL_FEATURES,
'prosodic': DEFAULT_PROSODIC_FEATURES,
'voice_quality': DEFAULT_VOICE_QUALITY_FEATURES
}
# All features to extract
ALL_FEATURES = {
'spectral': ALL_SPECTRAL_FEATURES,
'prosodic': ALL_PROSODIC_FEATURES,
'voice_quality': ALL_VOICE_QUALITY_FEATURES
}
|