Skip to content

API and model for audio based sentiment analysis that predicts emotion based on input soundfile

Notifications You must be signed in to change notification settings

ommahale/voice_based_sentiment_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

voice_based_sentiment_analysis

Deep Learning project for predicting emotions from voice using Tensorflow and Liberosa

Introduction

This project is backend for a voice based sentiment analysis application. The application is built using Tensorflow and Librosa. The model is trained on the Toronto Emotional Speech Set (TESS) dataset from Kaggle. The model is trained to predict 8 emotions namely angry, calm, fearful, happy, sad, surprised, neutral and disgust. The model is trained using a LTSM architecture. The model is trained on 5600 audio files. The model is trained for 100 epochs. The model is trained on a Local GPU Nvidia GForce 1660 Ti. The model is saved in the form of h5 file. The api is simply created using fast api

Run Project:

Using Docker(Reccomended)

First and formost make sure that docker daemon is running in you system. In order to build image you can either go to project directory and run

docker build

or

You can also use docker-compose to build the image. For this in the base directory run

docker-compose up

Installation

Create a virtual environment using the following command

virtualenv venv

Activate the virtual environment Windows:

venv\Scripts\activate

Linux:

source venv/bin/activate

MacOS:

source venv/bin/activate

Install the dependencies

pip install -r requirements.txt

Usage

Run the following command to start the server

cd api
uvicorn main:app --reload

The server will start on port 8000. The api can be accessed using the following url http://localhost:8000/swagger. This will open the swagger ui. The api can be tested using the swagger ui.


Start the React app using following commands

npm i
npm start

About

API and model for audio based sentiment analysis that predicts emotion based on input soundfile

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages