Skip to content

CarJam

2022-02-221 min read
Hackathon
CarJam

Devpost Submission

What is CarJam?

CarJam is a way to enjoy music on the road without the stress of creating a playlist.

Our web app listens to your ambient environment and suggests a song to play based on the mood.

For example, maybe you’re carpooling with 6 people and the car is positively vibing. Our app will suggest an upbeat, happy song to play. (we query the Spotify API with “liveness” and “energy” parameters).

On the flipside, let’s say you just had a bad day and you’re venting with your coworker on the way home. CarJam will suggest a downbeat, melancholic or sad song to play.

By listening to your ambient environment, CarJam matches your energy while introducing you to new music.

Technologies

Useful Resources I Found

How does it work?

CarJam was built as a React app hosted on a Rasberry Pi 3B+. A local Node.js server was hosted on our network.

My original flowchart:

Pi Mic → Frontend → encode/send audio to backend → backend uses audio to make API calls for sentiment analysis (GCS) → this data should be cached

Frontend requests a new song to play → backend uses last-cached sentiment data to make a spotify API call to get a song → backend sends this song url to the frontend → frontend updates the “next up” song.

What would I change for next time?

Efficiency and Performance
  • Chunk audio data. Potentially communicate with websockets
  • Cache audio data on AWS S3 or another cloud storage service.

Metadata
  • Extract more metadata from audio data to determine music to play, such as: dB level, number of unique voices, prevalent tones of voice
  • Extract other environmental metadata: Speed of car, Date and time, e.g. Day/night time

Inference
  • Avoid implicitly connecting the Google Sentiment Analysis directly to Spotify API query parameters. Instead, we could train an ML model to decide which parameters to “connect” together.