All Projects → Renovamen → Speech Emotion Recognition

Renovamen / Speech Emotion Recognition

Licence: mit
Speech emotion recognition implemented in Keras (LSTM, CNN, SVM, MLP) | 语音情感识别

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Speech Emotion Recognition

Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-46.41%)
Mutual labels:  cnn, lstm
Mnist Classification
Pytorch、Scikit-learn实现多种分类方法,包括逻辑回归(Logistic Regression)、多层感知机(MLP)、支持向量机(SVM)、K近邻(KNN)、CNN、RNN,极简代码适合新手小白入门,附英文实验报告(ACM模板)
Stars: ✭ 109 (-39.78%)
Mutual labels:  cnn, svm
Sarcasmdetection
Sarcasm detection on tweets using neural network
Stars: ✭ 99 (-45.3%)
Mutual labels:  cnn, lstm
Cnn lstm for text classify
CNN, LSTM, NBOW, fasttext 中文文本分类
Stars: ✭ 90 (-50.28%)
Mutual labels:  cnn, lstm
Easyocr
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
Stars: ✭ 13,379 (+7291.71%)
Mutual labels:  cnn, lstm
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-46.96%)
Mutual labels:  cnn, lstm
Eeg Dl
A Deep Learning library for EEG Tasks (Signals) Classification, based on TensorFlow.
Stars: ✭ 165 (-8.84%)
Mutual labels:  cnn, lstm
Lstm Context Embeddings
Augmenting word embeddings with their surrounding context using bidirectional RNN
Stars: ✭ 57 (-68.51%)
Mutual labels:  cnn, lstm
Pytorch convlstm
convolutional lstm implementation in pytorch
Stars: ✭ 126 (-30.39%)
Mutual labels:  cnn, lstm
Robust Lane Detection
Stars: ✭ 110 (-39.23%)
Mutual labels:  cnn, lstm
End To End Sequence Labeling Via Bi Directional Lstm Cnns Crf Tutorial
Tutorial for End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF
Stars: ✭ 87 (-51.93%)
Mutual labels:  cnn, lstm
Vpilot
Scripts and tools to easily communicate with DeepGTAV. In the future a self-driving agent will be implemented.
Stars: ✭ 136 (-24.86%)
Mutual labels:  cnn, lstm
Deepzip
NN based lossless compression
Stars: ✭ 69 (-61.88%)
Mutual labels:  cnn, lstm
Kaggle Competition Favorita
5th place solution for Kaggle competition Favorita Grocery Sales Forecasting
Stars: ✭ 169 (-6.63%)
Mutual labels:  cnn, lstm
Lstm Cnn classification
Stars: ✭ 64 (-64.64%)
Mutual labels:  cnn, lstm
Awesome Deep Learning Resources
Rough list of my favorite deep learning resources, useful for revisiting topics or for reference. I have got through all of the content listed there, carefully. - Guillaume Chevalier
Stars: ✭ 1,469 (+711.6%)
Mutual labels:  cnn, lstm
Keras basic
keras를 이용한 딥러닝 기초 학습
Stars: ✭ 39 (-78.45%)
Mutual labels:  cnn, lstm
Deepseqslam
The Official Deep Learning Framework for Route-based Place Recognition
Stars: ✭ 49 (-72.93%)
Mutual labels:  cnn, lstm
Deeplearning tutorials
The deeplearning algorithms implemented by tensorflow
Stars: ✭ 1,580 (+772.93%)
Mutual labels:  cnn, lstm
Ncrfpp
NCRF++, a Neural Sequence Labeling Toolkit. Easy use to any sequence labeling tasks (e.g. NER, POS, Segmentation). It includes character LSTM/CNN, word LSTM/CNN and softmax/CRF components.
Stars: ✭ 1,767 (+876.24%)
Mutual labels:  cnn, lstm

Speech Emotion Recognition

用 LSTM、CNN、SVM、MLP 进行语音情感识别,Keras 实现。

改进了特征提取方式,识别准确率提高到了 80% 左右。原来的版本的存档在 First-Version 分支

English Document | 中文文档

 

Environments

  • Python 3.6.7
  • Keras 2.2.4

 

Structure

├── models/                // 模型实现
│   ├── common.py          // 所有模型的基类
│   ├── dnn                // 神经网络模型
│   │   ├── dnn.py         // 所有神经网络模型的基类
│   │   ├── cnn.py         // CNN
│   │   └── lstm.py        // LSTM
│   └── ml.py              // SVM & MLP
├── extract_feats/         // 特征提取
│   ├── librosa.py         // librosa 提取特征
│   └── opensmile.py       // Opensmile 提取特征
├── utils/
│   ├── files.py           // 用于整理数据集(分类、批量重命名)
│   ├── opts.py            // 使用 argparse 从命令行读入参数
│   └── plot.py            // 绘图(雷达图、频谱图、波形图)
├── features/              // 存储提取好的特征
├── config/                // 配置参数(.yaml)
├── train.py               // 训练模型
├── predict.py             // 用训练好的模型预测指定音频的情感
└── preprocess.py          // 数据预处理(提取数据集中音频的特征并保存)

 

Requirments

Python

Tools

 

Datasets

  1. RAVDESS

    英文,24 个人(12 名男性,12 名女性)的大约 1500 个音频,表达了 8 种不同的情绪(第三位数字表示情绪类别):01 = neutral,02 = calm,03 = happy,04 = sad,05 = angry,06 = fearful,07 = disgust,08 = surprised。

  2. SAVEE

    英文,4 个人(男性)的大约 500 个音频,表达了 7 种不同的情绪(第一个字母表示情绪类别):a = anger,d = disgust,f = fear,h = happiness,n = neutral,sa = sadness,su = surprise。

  3. EMO-DB

    德语,10 个人(5 名男性,5 名女性)的大约 500 个音频,表达了 7 种不同的情绪(倒数第二个字母表示情绪类别):N = neutral,W = angry,A = fear,F = happy,T = sad,E = disgust,L = boredom。

  4. CASIA

    汉语,4 个人(2 名男性,2 名女性)的大约 1200 个音频,表达了 6 种不同的情绪:neutral,happy,sad,angry,fearful,surprised。

 

Usage

Prepare

安装依赖:

pip install -r requirements.txt

安装 Opensmile

 

Configuration

configs/ 文件夹中的配置文件(YAML)里配置参数。

其中 Opensmile 标准特征集目前只支持:

如果需要用其他特征集,可以自行修改 extract_feats/opensmile.py 中的 FEATURE_NUM 项。

 

Preprocess

首先需要提取数据集中音频的特征并保存到本地。Opensmile 提取的特征会被保存在 .csv 文件中,librosa 提取的特征会被保存在 .p 文件中。

python preprocess.py --config configs/example.yaml

其中,configs/example.yaml 是你的配置文件路径。

 

Train

数据集路径可以在 configs/ 中配置,相同情感的音频放在同一个文件夹里(可以参考 utils/files.py 整理数据),如:

└── datasets
    ├── angry
    ├── happy
    ├── sad
    ...

然后:

python train.py --config configs/example.yaml

 

Predict

用训练好的模型来预测指定音频的情感。checkpoints 分支release 页面有一些已经训练好的模型。

python predict.py --config configs/example.yaml

 

Functions

Radar Chart

画出预测概率的雷达图。

来源:Radar

import utils
"""
Args:
    data_prob (np.ndarray): 概率数组
    class_labels (list): 情感标签
"""
utils.radar(data_prob, class_labels)

 

Play Audio

播放一段音频

import utils
utils.play_audio(file_path)

 

Plot Curve

画训练过程的准确率曲线和损失曲线。

import utils
"""
Args:
    train (list): 训练集损失值或准确率数组
    val (list): 测试集损失值或准确率数组
    title (str): 图像标题
    y_label (str): y 轴标题
"""
utils.curve(train, val, title, y_label)

 

Waveform

画出音频的波形图。

import utils
utils.waveform(file_path)

 

Spectrogram

画出音频的频谱图。

import utils
utils.spectrogram(file_path)

 

Other Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].