Welcome to Skiza-App! This project focuses on developing and deploying a model to recognize emotions from speech, specifically tailored for Kenyan Swahili. The model leverages advanced machine learning techniques and is deployed using Streamlit for the web interface and user interaction.
To get started with Skiza-App, follow these steps to set up your environment and install the necessary dependencies:
git clone https://github.com/estherdatascientist/Swahili-Speech-Emotion-Recognition-System.git
cd Swahili-Speech-Emotion-Recognition-System
It’s recommended to use a virtual environment to manage dependencies:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required Python packages using pip
:
pip install -r requirements.txt
Ensure you have the Swahili speech dataset. Update the data_dir
path in the configuration files to point to your dataset location.
If not included in requirements.txt
, you may need to install Streamlit separately:
pip install streamlit
To train the model, open and run the Jupyter notebook main.ipynb
. This notebook will load the dataset, preprocess the audio files, extract features, and train various models. The best-performing model (Stacking Model with KNN as the meta-learner) will be saved in the models
directory.
jupyter notebook main.ipynb
To start the Streamlit app locally, use:
streamlit run app.py
This will open a new browser tab with the Streamlit app, allowing you to upload audio files and get emotion predictions.
You can also access the Skiza-App online at the following URL:
This web version provides the same functionality as the local app, allowing you to upload audio files, folders, or long audio files for emotion analysis.
- Emotion Recognition: Detects emotions from audio clips in Kenyan Swahili.
- Real-time Predictions: Provides immediate feedback through the Streamlit interface.
- User-friendly Interface: Streamlit provides a simple and intuitive web interface for uploading and analyzing audio files.
- Model Evaluation: Includes model evaluation metrics such as accuracy, confusion matrix, and ROC curves.
The Stacking Model with KNN as the meta-learner achieved an accuracy of 83%, making it the best performer among the tested models. For details on model performance and evaluation, refer to the evaluation
module in the codebase.
Skiza-App is deployed using:
- Streamlit: For building the web interface and allowing users to upload and analyze audio files.
- Streamlit Server: Manages the web app environment and user interactions.
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
Please make sure to adhere to the coding standards and include tests for new features.
Special thanks to the data collection participants and the following contributors for their valuable input and support:
This project is licensed under the GNU General Public License (GPL). See the LICENSE file for details.
Thank you for using and contributing to Skiza-App!