Code Monkey home page Code Monkey logo

emotion-recognition-using-speech's People

Contributors

dependabot[bot] avatar x4nth055 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emotion-recognition-using-speech's Issues

Different Results in Example 1

Hi,

I wanted to replicate Example 1 from the README. I didn’t make any changes to the code, but got the output much different from yours:

image

Also, the best model selection seems rather strange as I used SVC in the first place. I would appreciate it if you could comment on this issue.

Kind Regards,
Eduards

Invalid Syntax

I ran the pip install requirements.txt and it finished successfully. However when I try to run "python test.py" it gives a invalid syntax issue ->

Rakeshs-MacBook-Air:emotion-recognition-using-speech-master rakeshmohan$ python test.py
File "test.py", line 180
print(f"\t{emotion.capitalize()}: {proba*100:.2f}%")
^
SyntaxError: invalid syntax
Rakeshs-MacBook-Air:emotion-recognition-using-speech-master rakeshmohan$

Can you please help? I am very new to Python and ML etc.

extract_feature, did not work.

When I run:
from deep_emotion_recognition import DeepEmotionRecognizer
deeprec = DeepEmotionRecognizer(emotions=['angry', 'sad', 'neutral', 'ps', 'happy'], n_rnn_layers=2, n_dense_layers=2, rnn_units=128, dense_units=128)

train the model

deeprec.train()

get the accuracy

print(deeprec.test_score())

predict angry audio sample

prediction = deeprec.predict('data/validation/Actor_10/03-02-05-02-02-02-10_angry.wav')
print(f"Prediction: {prediction}")

[+] Model created
[*] Model weights loaded
1/1 [==============================] - 0s 400ms/step
0.7538461538461538

extract_feature, did not work.

ModuleNotFoundError: No module named 'numba.decorators'

Hi

First of all, Thanks a lot for providing such a valuable material. I am new to Python and may be its a silly question.

I am trying to run the Speech Emotion Recognition code. I followed all the instructions provided but when I try to run the test.py, it gives me below error.

ModuleNotFoundError: No module named 'numba.decorators'

numba is already installed,

any bit of help will be really Appreciated,

Thanks in advance

Problem with GridSearch

Hello,
Hope you are doing very well.
I run the model in order to determine the best model (with GridSearch). But it runs with the following problem:
'GradientBoostingClassifier' object has no attribute 'presort'

I couldn't fix it. please help me.
Thank you

TypeError: expected string or bytes-like object

Hi,

I am very new to working with Python, so this Issue might not be specific to the package, but I could not find anything online, so decided to ask. When I try to install import DeepEmotionRecognizer, I get the following error:

`---------------------------------------------------------------------------

TypeError Traceback (most recent call last)
in
----> 1 from deep_emotion_recognition import DeepEmotionRecognizer
2

~/Documents/UCONN/GE/Data/Adam/emotion-recognition-using-speech/deep_emotion_recognition.py in
16 from data_extractor import load_data
17 from create_csv import write_custom_csv, write_emodb_csv, write_tess_ravdess_csv
---> 18 from emotion_recognition import EmotionRecognizer
19 from utils import get_first_letters, AVAILABLE_EMOTIONS, extract_feature, get_dropout_str
20

~/Documents/UCONN/GE/Data/Adam/emotion-recognition-using-speech/emotion_recognition.py in
7 from sklearn.model_selection import GridSearchCV
8
----> 9 import matplotlib.pyplot as pl
10 from time import time
11 from utils import get_best_estimators, get_audio_config

~/anaconda3/lib/python3.7/site-packages/matplotlib/pyplot.py in
36 import matplotlib.colorbar
37 import matplotlib.image
---> 38 from matplotlib import rcsetup, style
39 from matplotlib import _pylab_helpers, interactive
40 from matplotlib import cbook

~/anaconda3/lib/python3.7/site-packages/matplotlib/style/init.py in
----> 1 from .core import use, context, available, library, reload_library

~/anaconda3/lib/python3.7/site-packages/matplotlib/style/core.py in
222 # Load style library
223 # ==================
--> 224 _base_library = load_base_library()
225
226 library = None

~/anaconda3/lib/python3.7/site-packages/matplotlib/style/core.py in load_base_library()
164 def load_base_library():
165 """Load style library defined in this package."""
--> 166 library = read_style_directory(BASE_LIBRARY_PATH)
167 return library
168

~/anaconda3/lib/python3.7/site-packages/matplotlib/style/core.py in read_style_directory(style_dir)
200 with warnings.catch_warnings(record=True) as warns:
201 styles[path.stem] = rc_params_from_file(
--> 202 path, use_default_template=False)
203 for w in warns:
204 _log.warning('In %s: %s', path, w.message)

~/anaconda3/lib/python3.7/site-packages/matplotlib/init.py in rc_params_from_file(fname, fail_on_error, use_default_template)
983 'c': 'color',
984 'fc': 'facecolor',
--> 985 'ec': 'edgecolor',
986 'mew': 'markeredgewidth',
987 'aa': 'antialiased',

~/anaconda3/lib/python3.7/site-packages/matplotlib/init.py in _rc_params_in_file(fname, fail_on_error)
914 rcParamsOrig = RcParams(rcParams.copy())
915 # This also checks that all rcParams are indeed listed in the template.
--> 916 # Assiging to rcsetup.defaultParams is left only for backcompat.
917 defaultParams = rcsetup.defaultParams = {
918 # We want to resolve deprecated rcParams, but not backend...

~/anaconda3/lib/python3.7/contextlib.py in enter(self)
110 del self.args, self.kwds, self.func
111 try:
--> 112 return next(self.gen)
113 except StopIteration:
114 raise RuntimeError("generator didn't yield") from None

~/anaconda3/lib/python3.7/site-packages/matplotlib/init.py in _open_file_or_url(fname)
891 You have the following UNSUPPORTED LaTeX preamble customizations:
892 %s
--> 893 Please do not ask for support with these customizations active.
894 *****************************************************************
895 """, '\n'.join(config['text.latex.preamble']))

~/anaconda3/lib/python3.7/site-packages/matplotlib/init.py in is_url(filename)
886 config['datapath'] = get_data_path(_from_rc=config['datapath'])
887
--> 888 if "".join(config['text.latex.preamble']):
889 _log.info("""
890 *****************************************************************

TypeError: expected string or bytes-like object`

Do you have any idea what is the problem?
I appreciate any insight:)

Where the SVC () model is saved?

Hi, please tell me where the SVC () model is saved after training?
I tried to save rec. model_trained, but I get an error with it :(
AttributeError: 'EmotionRecognizer' object has no attribute 'X_test'

Error while running the pretrained model: No such file or directory: 'train_custom.csv'

FileNotFoundError Traceback (most recent call last)
in ()
7 rec = EmotionRecognizer(model=my_model, emotions=['sad', 'neutral', 'happy'], balance=True, verbose=0)
8 # train the model
----> 9 rec.train()
10 # check the test accuracy for that model
11 print("Test score:", rec.test_score())

10 frames
/usr/local/lib/python3.7/dist-packages/pandas/io/parsers.py in init(self, src, **kwds)
2008 kwds["usecols"] = self.usecols
2009
-> 2010 self._reader = parsers.TextReader(src, **kwds)
2011 self.unnamed_cols = self._reader.unnamed_cols
2012

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.cinit()

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: [Errno 2] No such file or directory: 'train_custom.csv'

Different Results in Example 2

Hello,

I just ran the Example 2 from the README. I didn’t make any changes to the code, but the confusion_matrix showed that the percentage of ‘happy’ and ‘sad’ were mistaken.

image

I would appreciate it if you could comment on this issue.

Confusion matrix incomplete problem 混淆矩阵不完整

{'angry': 1.0, 'sad': 1.0595564e-14, 'neutral': 3.413421e-14, 'ps': 2.9746183e-09, 'happy': 1.6824228e-19}
predicted_angry predicted_sad ... predicted_ps predicted_happy
true_angry 87.179489 6.410257 ... 5.128205 0.000000
true_sad 14.102565 75.641022 ... 7.692308 1.282051
true_neutral 3.846154 6.410257 ... 1.282051 5.128205
true_ps 5.128205 7.692308 ... 80.769226 0.000000
true_happy 10.256411 6.410257 ... 10.256411 66.666672

[5 rows x 5 columns]

Error while running the pretrained model: No such file or directory: 'train_custom.csv'

Hello, Could you please help me in this?

  3 rec = EmotionRecognizer(None, emotions=["boredom", "neutral"], features=["mfcc"])
  4 # evaluate all models in `grid` folder and determine the best one in terms of test accuracy

----> 5 rec.determine_best_model()
6 # now you can make inference on the model
7 rec.predict("data/emodb/wav/15b09La.wav") # 'boredom'

10 frames
/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in init(self, src, **kwds)
2008 kwds["usecols"] = self.usecols
2009
-> 2010 self._reader = parsers.TextReader(src, **kwds)
2011 self.unnamed_cols = self._reader.unnamed_cols
2012

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.cinit()

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: [Errno 2] No such file or directory: 'train_custom.csv'

Using a pre trained model

Hello,
I want to use a pre trained model to detect boredom in speech? How can I do that? Can you please share your pre trained model for it?

Error about rec.determine_best_model(train=True)

When I run this sentence rec.determine_best_model(train=True), the code gives error:ModuleNotFoundError: No module named 'sklearn.ensemble._gb_losses'. How to slove it?Is it about the scikit-learn's version?

References paper

Hi, This is a good job, thank you for your open source!
Is this work has any references paper to this work?

I could not run the example in the readme

Hi, I git clone the repo and install the dependency. Then I new a pyhton script which is written as the readme does. But it did not print anything and no error messages. How could this be fixed?

Issue using predict_proba(emotion_recognizer)

When using predict_proba (emotion_recognizer), I get different results based on the order of the chosen emotions.
i.e. if I write "sad","neutral","happy" and then "happy","neutral","sad", my results are different.

Hi,

Hi,
Can I use your model to detect any other emotion like rudeness using my own custom-dataset? If yes, please guide.

Originally posted by @Tanish18 in #4 (comment)

Regarding set up of project

Can i get a tutorial means how to set up this project , i am using jupyter notebook can any one give me any tutorial how to run this project.

Testing on WAV files from Youtube?

Hello,

I wanted to use this repository for calling predictions and prediction probabilities on .wav files I'm getting from the internet. I've been using converted youtube audio clips (in the final form of .wav). For some reason, basic predictions aren't being done on these files. I wanted to know if you could explain how one should properly test these new WAV files. For the time being, I've just been following example 2 in the README, downloading the files, and putting them in their own folder within the emotion-recognition-using-speech one. Is there anything in the code I should modify to be able to use this program on wav files converted from Youtube?

Speech to text problem

Hi,
Based on this, I tried to convert speech to text, but whatever I do in the test file is the same print every time, even if I delete from the test file "print ('please talk')", so nothing changes it prints me "please talk" in output. I run the program in order but the output is the same. Also I try to delete some code to make mistake, I thought it wll be an error, but the output is the same.
[+] Model trained
Test accuracy score: 48.677%
Please talk
calm

Thank You in advance.

Best regards.
Bekir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.