seernet / deepaffects-node Goto Github PK
View Code? Open in Web Editor NEWNode wrapper for DeepAffects API
Home Page: https://developers.deepaffects.com
License: MIT License
Node wrapper for DeepAffects API
Home Page: https://developers.deepaffects.com
License: MIT License
I tried to get the emotion in different mp3 files and It doesn't return any score values. It always null?
I have tested the Emotion Recognition API with 10 different samples for all the 7 emotions. Out of 70 tests, none of them failed. It was 100% accurate. But this was because I used a particular type of .wav files (find them here: https://tspace.library.utoronto.ca/handle/1807/24487 ). When I use mp3 files or other files expressing exactly the same emotion, the API fails. It identifies a wrong emotion.
I also tried to provide base64 encoded data. The same happened: for this sort of files, it works perfectly, for others it just fails. With curl request, the same happens. A big difference between encoded .wav files and encoded .mp3 or other formats or even .wav files with different properties. And this is even more annoying.
For example, in the MP3 file here, taken directly from your website, the API will not identify fear(as it should and you state it should), but it identifies happiness with a score of 0.6907534228467851:
https://drive.google.com/file/d/1HKkGCzci5GE6ObC8Frm-hMacTINcE9yd/view?usp=sharing
However, for exactly the same content, but in .wav format, it identifies fear correctly with a score of 0.9999930278037144.
https://drive.google.com/file/d/1pc8ekCX_--m5c-e7amxwEz-CCuKJuggy/view?usp=sharing
Please, tell me what are the required properties for the files provided as parameters. I was testing it with files of different sample rate, bit rate, file type, bits per sample, encoding, etc. It just fails.
I'm currently using deep affects emotion analyser for reading audio
Is it possible to load from blob?
For example:
DeepAffects.Audio.fromFile("blob:url_here");
I checked your website https://www.deepaffects.com/emotion-recognition-api/ and in the first section where you can play the sounds by emotion, I grab the sound file of happy
which is this url
Happy Audio
I converted the audio file to wav
format and load the file using your api
var body = DeepAffects.Audio.fromFile("happy-audio.wav");
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data.length);
for(var i=0; i < data.length; i++) {
console.log("Emotion: " + data[i].emotion + " Score: " + data[i].score);
}
}
};
var result = apiInstance.syncRecogniseEmotion(body, callback);
res.json(result);
The result I am getting is
the highest score mood is neutral but the audio file that I used is happy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.