Meet Regina George, Your Gen Z Social Queen

We love this project from community member Tracy Tao! “Regina George” is a voice-activated AI application designed to be your go-to for all things social. Inspired by the queen bee herself,...

Author: Lydia You

We love this project from community member Tracy Tao!

“Regina George” is a voice-activated AI application designed to be your go-to for all things social. Inspired by the queen bee herself, this app takes on Regina’s bold personality, offering you social advice, fashion tips, and entertainment recommendations with a flair only she could deliver.

Demo

About the Project

Tracy wanted to make a project that was both fun and useful. She wanted to build a companion that was sassy and encouraging, something akin to what a real friend would for you.

Features:

  • Social Savvy Advice: Navigate social dynamics with ease. Whether you’re preparing for a night out or navigating the complexities of social media, Regina offers advice that’s both insightful and straight to the point.

  • Fashion Forward: Get personalized fashion advice. From outfit recommendations to the latest trends, Regina ensures you’re always dressed to impress.

  • Entertainment at Your Fingertips: Looking for movie recommendations or the perfect playlist? Regina’s got you covered with picks that match your mood and taste.

  • Boost Your Confidence: With Regina’s encouragement and sharp wit, you’ll tackle social situations with a newfound confidence.

  • Stay Connected: Regina can look up your friends’ latest posts on Instagram, keeping you in the loop without ever having to scroll through your feed.

Methodology

Below is a code snippet showing how to play a song on Spotify:

Python

def play_song(search_song=''):
    if platform.system() == 'Linux':
        try:
            # Command to open Spotify installed via Snap on Ubuntu
            subprocess.Popen(['spotify'])

            chat_response = "Music is playing, from one of your playlist what's next"
        except FileNotFoundError:
            # If Spotify is not found, install it
            if install_spotify():
                print("Spotify has been installed successfully. Please restart your script.")
                subprocess.Popen(['spotify'])
                chat_response = "Login to spotify and play music again."
            else:
                print("Failed to install Spotify.")
            sleep(2)
    # for mac check ~/Applications/Spotify.app

    client_id = ""
    client_secret = ""
    redirect_uri = ''

    # Define the required scopes
    scope = ['app-remote-control', 'user-read-playback-state', 'user-modify-playback-state']

    # Create a SpotifyOAuth object
    sp_oauth = spotipy.SpotifyOAuth(client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri, scope=scope)

    # Create a Spotify client with the OAuth manager
    spotifyObject = spotipy.Spotify(auth_manager=sp_oauth)
    if search_song:
        results = spotifyObject.search(search_song, 1, 0, "track") 
        songs_dict = results['tracks'] 
        song_items = songs_dict['items'] 
        song = song_items[0]['external_urls']['spotify'] 
        track_id = song.split('/')[-1]
    else:
        track_id = get_random_track(spotifyObject)
    # print(track_id)
    devices = spotifyObject.devices()
    # print(devices)
    device_id = None
    data = {}
    # Start playback on the active device
    if devices['devices']: 
        device_id = devices['devices'][0]['id']  # Set this to your device's ID if you have a specific device you want to play on
    try:
        # Your code to start playback
        spotifyObject.start_playback(device_id=device_id, context_uri=None, uris=["spotify:track:"+track_id], offset=None)
    except spotipy.exceptions.SpotifyException as e:
        print(e)
    return

About the Developer

Tracy Tao studied Computer Science at the University of Southern California. She is passionate about user design and storytelling and loves making entertaining apps.