Skip to main content

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.

Release files for hey-spotify 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hey-spotify 1.1.0
File Size Uploaded
hey_spotify-1.1.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hey-spotify 1.1.0
File Interpreter ABI Platform
hey_spotify-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / hey_spotify-1.1.0.tar.gz

Download URL hey_spotify-1.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5cf2b26729fea1a87402d62803e97933de02501fcc31ce8a8752eee2f527c796
BLAKE2b-256 checksum
How to use checksums
9212dda4310dc4345eaf0e42a38aa9b1a590b4f7e56e20b8215242535b7810df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / hey_spotify-1.1.0-py3-none-any.whl

Download URL hey_spotify-1.1.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0a683712af95936c33508bfc832fa375e6c046c13a19ecd5270a9e356bc85e8
BLAKE2b-256 checksum
How to use checksums
69189288574478963ab0104674c897aa0057e0dc2ee2576a35be478268ae92b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page