This web application is designed to provide music therapy and emotional support to users by analyzing their diary entries and generating custom songs based on their emotions. The application uses several APIs, including Eleven Labs for custom voice, Spotify for playlist generation, Suno AI for custom songs, and OpenAI's GPT-4 for emotion analysis and message generation. The backend is built with Flask and the data is stored in MongoDB.
- Python 3.7 or higher
- Flask
- flask_cors
- spotipy
- openai
- requests
- pymongo
- hashlib
- Clone the repository:
git clone https://github.com/ritessshhh/mindaid.git
- Navigate to the project directory:
cd mindaid
- Install the required dependencies:
pip install -r requirements.txt
- Set up your environment variables:
- Create a
.env
file in the project root directory. - Add your API keys and MongoDB connection string to the
.env
file.
- Run the Flask application:
python Server.py
- The application provides endpoints for analyzing diary entries, generating custom songs, and retrieving stored songs.
- Use the
/heal
endpoint to submit a diary entry and receive a custom song based on the analyzed emotions. - Use the
/songs
endpoint to retrieve a list of all stored songs.
POST /heal
: Analyzes the submitted diary entry and generates a custom song.GET /songs
: Retrieves a list of all stored songs.
This project is licensed under the MIT License.