Skip to main content

A premium, voice-controlled terminal interface for Spotify playback.

Project description

hey-spotify 🎤 🎵

PyPI version License: MIT

A premium, voice-controlled terminal interface for Spotify playback. Control your music without leaving your terminal or touching your keyboard.

📋 Prerequisites

  • Spotify Premium: A Premium subscription is required for playback control via the Spotify API.
  • Python 3.8+: Ensure you have a modern Python version installed.

🚀 Quick Start

1. Install

Install the package directly via pip:

pip install hey-spotify

Note: Depending on your OS, you might need to install system dependencies for PyAudio (e.g., portaudio on macOS or python3-pyaudio on Linux).

2. Spotify API Setup

  1. Go to the Spotify Developer Dashboard.
  2. Create a new app and name it (e.g., hey-spotify).
  3. Add http://127.0.0.1:8888/callback as a Redirect URI in your app settings.
  4. Set up your environment variables (see Environment Variables section).

3. Run

Launch the CLI:

hey-spotify

On the first run, it will open your browser for authentication.

🎙️ Voice Commands

Once active, just say "Hey Spotify" followed by:

  • play <song name> — Plays a specific track.
  • pause / stop — Pauses current playback.
  • resume / continue — Resumes playback.
  • next / skip — Skips to the next track.
  • previous — Goes back to the previous track.
  • volume <0-100> — Sets volume to a specific level.
  • volume up / volume down — Adjusts volume by 10%.
  • now playing — Shows information about the current track.
  • exit / quit — Closes the application.

⚙️ Configuration

Environment Variables

You can create a .env file in your working directory or set them in your shell:

SPOTIPY_CLIENT_ID='your_client_id'
SPOTIPY_CLIENT_SECRET='your_client_secret'
SPOTIPY_REDIRECT_URI='http://127.0.0.1:8888/callback'

CLI Options

  • --list-mics: List all detected microphone devices.
  • --mic-index <index>: Use a non-default microphone.
  • --no-wake-word: Disable "Hey Spotify" trigger and listen continuously.
  • --language <lang>: Change recognition language (e.g., en-US, es-ES).
  • --voice-debug: See what the engine is hearing in real-time.

🛠️ Troubleshooting

  • Microphone not found: Ensure you've granted terminal permissions for the microphone and use --list-mics to find the correct index.
  • Spotify Authentication: Ensure your Redirect URI in the Dashboard exactly matches the one in your environment.

📄 License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hey_spotify-1.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hey_spotify-1.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file hey_spotify-1.1.0.tar.gz.

File metadata

  • Download URL: hey_spotify-1.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hey_spotify-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5cf2b26729fea1a87402d62803e97933de02501fcc31ce8a8752eee2f527c796
MD5 deaa6eeaae2c9468dc4f761ea9fb5066
BLAKE2b-256 9212dda4310dc4345eaf0e42a38aa9b1a590b4f7e56e20b8215242535b7810df

See more details on using hashes here.

File details

Details for the file hey_spotify-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: hey_spotify-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hey_spotify-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0a683712af95936c33508bfc832fa375e6c046c13a19ecd5270a9e356bc85e8
MD5 d3707be803ab68f75ddc8c2103ab592f
BLAKE2b-256 69189288574478963ab0104674c897aa0057e0dc2ee2576a35be478268ae92b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page