{"id":30848316,"url":"https://github.com/karansingla-dev/emotion-music-player","last_synced_at":"2026-04-14T05:31:24.249Z","repository":{"id":312870690,"uuid":"1048578369","full_name":"karansingla-dev/emotion-music-player","owner":"karansingla-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-02T17:57:46.000Z","size":95690,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-02T19:31:12.461Z","etag":null,"topics":["deepface","docker","docker-compose","fastapi","nextjs","pytorch","spotify-web-api","tailwindcss","tensorflow"],"latest_commit_sha":null,"homepage":"https://emotion-music-player-n3fh.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karansingla-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T17:07:25.000Z","updated_at":"2025-09-02T18:31:18.000Z","dependencies_parsed_at":"2025-09-02T15:27:08.079Z","dependency_job_id":null,"html_url":"https://github.com/karansingla-dev/emotion-music-player","commit_stats":null,"previous_names":["karansingla007/emotion-music-player","karansingla-dev/emotion-music-player"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/karansingla-dev/emotion-music-player","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karansingla-dev%2Femotion-music-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karansingla-dev%2Femotion-music-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karansingla-dev%2Femotion-music-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karansingla-dev%2Femotion-music-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karansingla-dev","download_url":"https://codeload.github.com/karansingla-dev/emotion-music-player/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karansingla-dev%2Femotion-music-player/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273990205,"owners_count":25203290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepface","docker","docker-compose","fastapi","nextjs","pytorch","spotify-web-api","tailwindcss","tensorflow"],"created_at":"2025-09-07T03:08:21.752Z","updated_at":"2026-04-14T05:31:24.213Z","avatar_url":"https://github.com/karansingla-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.png\" alt=\"Emotion-Based Music Player\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n# 🎶 Emotion-Based Music Player\n\nAn **AI-powered music recommendation app** that detects your real-time **facial emotions** 🎥 and suggests personalized **Spotify tracks** 🎵 based on your **mood, language, and genre preferences**.\n\nBuilt with **FastAPI + Deep Learning (FER/DeepFace) + Next.js + Tailwind + Spotify API + Docker** 🚀\n\n---\n\n## ✨ Features\n\n- ✅ Real-time **emotion detection** from webcam (happy, sad, angry, surprise, neutral, etc.)\n- ✅ **Spotify integration** to fetch recommended tracks 🎧\n- ✅ User can choose **preferred language** (English, Hindi, Punjabi, etc.)\n- ✅ User can choose **preferred genre** (Pop, Rock, Classical, Lofi, etc.)\n- ✅ Built-in **music player** (Play, Pause, Seek) using Spotify `preview_url`\n- ✅ **Fallback to Spotify app** if no preview available\n- ✅ Beautiful **UI with Tailwind + Framer Motion animations**\n- ✅ **Dockerized backend** for smooth deployment\n\n---\n\n## 🖼️ Demo\n\n![screenshot](assets/demo1.png)\n![screenshot](assets/demo2.png)\n\n---\n\n## 🏗️ Tech Stack\n\n### 🎯 Frontend\n- [Next.js 14](https://nextjs.org/) + [React](https://react.dev/)\n- [Tailwind CSS](https://tailwindcss.com/) for styling\n- [Framer Motion](https://www.framer.com/motion/) for animations\n\n### ⚡ Backend\n- [FastAPI](https://fastapi.tiangolo.com/)\n- [FER](https://github.com/justinshenk/fer) / [DeepFace](https://github.com/serengil/deepface) for emotion recognition\n- [TensorFlow](https://www.tensorflow.org/) \u0026 [PyTorch](https://pytorch.org/)\n- [Spotify Web API](https://developer.spotify.com/documentation/web-api/)\n\n### 🐳 Deployment\n- Docker + Docker Compose\n\n---\n\n## 🚀 Getting Started\n\n### 1️⃣ Clone the Repo\n```bash\ngit clone https://github.com/your-username/emotion-music-player.git\ncd emotion-music-player\n```\n\n---\n\n### 2️⃣ Backend Setup (FastAPI + Docker)\n```bash\ncd backend\ncp .env.example .env  # add your SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET\ndocker compose up --build\n```\n\nBackend will start on:  \n👉 [http://localhost:8000/docs](http://localhost:8000/docs)\n\n---\n\n### 3️⃣ Frontend Setup (Next.js)\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\nFrontend will run on:  \n👉 [http://localhost:3000](http://localhost:3000)\n\n---\n\n### 4️⃣ Spotify API Setup\n1. Go to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/)  \n2. Create a new app → get `CLIENT_ID` and `CLIENT_SECRET`  \n3. Add them in `backend/.env`:  \n\n```env\nSPOTIFY_CLIENT_ID=your_id_here\nSPOTIFY_CLIENT_SECRET=your_secret_here\n```\n\n---\n\n## 🎥 How It Works\n\n1. User opens the app → grants camera permission  \n2. Camera captures frames every few seconds  \n3. Backend analyzes face → detects emotion  \n4. Based on emotion + selected **language/genre**, Spotify API is queried  \n5. App displays recommended songs with a built-in music player  \n\n---\n\n## 📂 Project Structure\n\n```\nemotion-music-player/\n├── backend/                # FastAPI + Emotion Detection\n│   ├── app/\n│   │   ├── main.py         # FastAPI routes\n│   │   ├── emotion.py      # Emotion detection logic\n│   ├── Dockerfile\n│   ├── requirements.txt\n│\n├── frontend/               # Next.js + Tailwind\n│   ├── src/app/\n│   │   ├── player/page.tsx # Main player UI\n│   │   ├── components/     # AudioPlayer, CameraCapture etc.\n│   ├── package.json\n│   └── tailwind.config.js\n│\n|── docker-compose.yml\n├── assets/                 # Screenshots, banner, GIFs\n│   └── banner.png\n│\n└── README.md\n```\n\n---\n\n## 🛠️ Future Improvements\n\n- 🎤 Voice commands (e.g., “play happy songs”)\n- 📱 Mobile app version with React Native / Flutter\n- 🤝 Multi-user support with accounts\n- 🎨 More advanced UI like Spotify clone\n\n---\n\n## 👨‍💻 Contributors\n\n- **Your Name** – [@karansingla007](https://github.com/karansingla007)\n\n---\n\n## ⭐ Support\n\nIf you like this project, don’t forget to **star ⭐ the repo**.  \nPull requests are welcome 🚀\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaransingla-dev%2Femotion-music-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaransingla-dev%2Femotion-music-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaransingla-dev%2Femotion-music-player/lists"}