/JUDAS

lightweight AI assistant with multiple capabilities such as controlling my Spotify, contributing to conversations that I am having and generating shell scripts that can be executed to get certain tasks or information on my system.

Primary LanguagePython


AI Assistant with Spotify Integration

Overview

This project demonstrates an AI-powered assistant that leverages its huge knowledge base of songs, its meaning and music and understanding of conversation to suggest the best suited tracks based on your request. It integrates with Spotify to seamlessly play tracks that is suggests to the user.

Features

  • Intelligent Conversational Abilities: The AI assistant will listen to what you have to say and when it feel's like responding it will, you can also have normal questions and interactions you would have with any other LLM.
  • Intelligent Song Suggestions: The AI assistant uses advanced natural language understanding to suggest songs tailored to your mood, preferences, and commands, It can even consider the conversation you have had so far to suggest new songs.
  • Seamless Spotify Integration: Leverages the Spotify API to play songs and have playback control without leaving your chat interface.
  • Text Commands: Interact via text to get music recommendations in real-time.

Installation

To run the JUDAS, follow these steps:

Prerequisites

Steps

  1. Clone the repository

    git clone https://github.com/Shalom-P/JUDAS.git
    cd JUDAS
    virtualenv spotifyenv
    source spotifyenv/bin/activate
    pip3 install -r req.txt
  2. Set up environment variables

    edit the sample.env file in the project root and add your Spotify API credentials:

    SPOTIPY_CLIENT_ID=your-client-id
    SPOTIPY_CLIENT_SECRET=your-client-secret
    SPOTIPY_REDIRECT_URI=http://localhost:your-port
    HF_TOKEN=your-hugging-face-token-for-llama3.1
  3. Run Docker Compose

    Ensure that Docker and Docker Compose are installed, then run:

    ./run.sh
  4. Access the Assistant

    Once the Docker containers are running, you can interact with the AI music assistant through the interface provided.

Usage

  • Ask the assistant to suggest songs based on mood:

    "I'm feeling energetic, can you suggest something upbeat?"
    
  • Play specific songs by name, artist, or genre:

    "Play some jazz music by Miles Davis."
    
  • Play songs based on the conversation so far:

    "Suggest some songs that I may like based on the conversation so far."
    
  • Example: Alt text

Spotify Authentication

The assistant uses Spotipy's SpotifyOAuth for authentication. The OAuth process is handled automatically without the need for manual token entry. Refer to the .env setup for supplying necessary credentials.

Future Enhancements

  • Deeper Recommendation System: Use collaborative filtering or user interaction history to provide more personalized song suggestions.
  • Multiple Music Services: Expand the assistant to work with other music streaming platforms such as Apple Music or YouTube Music.
  • Customizable Playlists: Build playlists on the fly based on themes, artists, or genres mentioned during the conversation.
  • Provide the rest of the api functionalities using RAG: Will be able to also use your listening history and make full use of spotify's api's.

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests to improve the project.

License

This project is licensed under the MIT License - see the LICENSE file for details.