Streaming services automatically scan audio for copyrighted content, and mute or block uploads featuring this content. This makes it difficult for content creators to find appropriate background music. Our app, AutomatedGroove, automatically generates royalty-free music for content creators, saving them time and money.
Find the frontend repository here: AutomatedGroove Frontend
- Clone the repository to your local machine:
$ git clone https://github.com/KitSutliff/automated_groove_backend.git
- Navigate into the repository:
$ cd automated_groove_backend
- Create a virtual environment:
$ python -m venv venv
- Activate the virtual environment:
$ source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install dependencies:
$ pip install -r requirements.txt
Set the following environment variables in a .env
file:
OPENAI_API_KEY
MUSICFY_API_KEY
Note: You need to obtain your own API keys from both OpenAI and Musicfy AI to use in this project.
- Run the
flask
development server:$ flask run
- To access the application locally, open a web browser and go to http://localhost:5000.
Method: POST
Description: Generates a song name based on the provided genre, mood, and tempo.
Request Body The request body should be a JSON object containing the following fields:
{
"genre": ["pop"],
"mood": ["happy"],
"tempo": ["medium"]
}
Response Body The response will be a JSON object containing a generated song name.
"Song Name”
Method: POST
Description: Generates a song based on the provided genre, mood, and tempo by calling the Musicfy API.
Request Body The request body should be a JSON object containing the following fields:
{
"genre": ["pop"],
"mood": ["happy"],
"tempo": ["medium"]
}
Response Body The response will be a JSON object containing the generated song url from the Musicfy API.
[
{
"file_url": "https://example-url",
"type": "music"
}
]
Run the pytest
testing framework:
$ pytest
This project is licensed under the MIT License. See the LICENSE file for details.