This is a kit for simple speech feature extraction.
Project description
Speech Feature Kit
A Python wrapper for convenient speech feature extraction
Functions
- MFCC feature analysis
- Volume analysis
- Emotion analysis
Example of emotion analysis
from speech_features_kit.Emotion.speech_toolkit import SpeechEmotionToolkit
# set the path of pre-trained model for speech emotion model
speech_kit = SpeechEmotionToolkit(
model_path='../data/speech_emotion/speech_mfcc_model.h5',
model_para_path='../data/speech_emotion/mfcc_model_para_dict.pkl')
# load the model
speech_kit.load()
# obtain emotion list with timestamp given an audio file
## num_sec_each_file: specify the number of seconds each chunk contains when dividing the audio file
list_emo, list_timestamp = speech_kit.get_emotion_list_by_blocks(audio_file="../data/speech_emotion/haodf.mp3",
num_sec_each_file=5)
# print the list of emotion over timestamp
print("Time interval\tEmotion")
for idx, e in enumerate(list_emo):
print(list_timestamp[idx], "\t", e)
Note
Other functions please see the examples folder!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for speech-features-kit-1.0.0.dev5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dcd14d4610410d4c0ed9a1cb90ebc096b36dd877d7d166b70f895a4ba4bf69f |
|
MD5 | 95b1d9bc7738eae0c5ff64443179e8c8 |
|
BLAKE2b-256 | 9bd037a465328866b2ea42b39f06f29583251298b2b73eea4c6127ba1ca4fbc6 |