Views
No views yet
| Release | EDER(%) |
|---|---|
| 05-07-23 | 29.7 (Avg: 30.2) |
git clone https://github.com/speechbrain/speechbrain.git
cd speechbrain
pip install -r requirements.txt
pip install --editable .1from speechbrain.inference.diarization import Speech_Emotion_Diarization
2classifier = Speech_Emotion_Diarization.from_hparams(
3 source="speechbrain/emotion-diarization-wavlm-large"
4)
5diary = classifier.diarize_file("speechbrain/emotion-diarization-wavlm-large/example.wav")
6print(diary)
7
8# {
9# 'speechbrain/emotion-diarization-wavlm-large/example.wav':
10# [
11# {'start': 0.0, 'end': 1.94, 'emotion': 'n'}, # n -> neutral
12# {'start': 1.94, 'end': 4.48, 'emotion': 'h'} # h -> happy
13# ]
14# }
15
16diary = classifier.diarize_file("speechbrain/emotion-diarization-wavlm-large/example_sad.wav")
17print(diary)
18
19# {
20# 'speechbrain/emotion-diarization-wavlm-large/example_sad.wav':
21# [
22# {'start': 0.0, 'end': 3.54, 'emotion': 's'}, # s -> sad
23# {'start': 3.54, 'end': 5.26, 'emotion': 'n'} # n -> neutral
24# ]
25# }run_opts={"device":"cuda"} when calling the from_hparams method.git clone https://github.com/speechbrain/speechbrain/cd speechbrain
pip install -r requirements.txt
pip install -e .cd recipes/ZaionEmotionDataset/emotion_diarization
python train.py hparams/train.yaml --zed_folder /path/to/ZED --emovdb_folder /path/to/EmoV-DB --esd_folder /path/to/ESD --iemocap_folder /path/to/IEMOCAP --jlcorpus_folder /path/to/JL_corpus --ravdess_folder /path/to/RAVDESS1@article{wang2023speech,
2 title={Speech Emotion Diarization: Which Emotion Appears When?},
3 author={Wang, Yingzhi and Ravanelli, Mirco and Nfissi, Alaa and Yacoubi, Alya},
4 journal={arXiv preprint arXiv:2306.12991},
5 year={2023}
6}1@misc{speechbrain,
2 title={{SpeechBrain}: A General-Purpose Speech Toolkit},
3 author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
4 year={2021},
5 eprint={2106.04624},
6 archivePrefix={arXiv},
7 primaryClass={eess.AS},
8 note={arXiv:2106.04624}
9}