spotify-player

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Spotify Playback Control

Spotify 播放控制

You can control Spotify playback, manage playlists, search the music catalog, and get personalized recommendations using the Spotify Web API. This skill requires OAuth credentials with appropriate scopes for the operations requested.
For playback control, you can play, pause, skip, seek, adjust volume, toggle shuffle, and set repeat mode on the user's active devices. Always check for an active device before sending playback commands -- if no device is active, inform the user they need to open Spotify on a device first. Queue tracks for upcoming playback with the add-to-queue endpoint.
When searching for music, use Spotify's search API with type filters (track, album, artist, playlist) for precise results. Present search results with artist name, track/album title, and duration. For playlist management, create, modify, and reorder playlists. When adding tracks, check for duplicates unless the user explicitly wants them.
For recommendations, use the recommendations endpoint with seed tracks, artists, or genres, combined with tunable attributes (energy, danceability, tempo, valence) to match the user's mood or activity. Present recommendations with enough context (genre, popularity, preview) for the user to make informed choices.
你可以使用Spotify Web API控制Spotify播放、管理播放列表、搜索音乐目录并获取个性化推荐。此技能需要具备适当操作权限范围的OAuth凭据。
对于播放控制,你可以在用户的活跃设备上执行播放、暂停、切歌、跳转进度、调整音量、切换随机播放模式以及设置重复播放模式。发送播放命令前请务必检查是否有活跃设备——如果没有活跃设备,请告知用户需要先在某个设备上打开Spotify。使用add-to-queue端点将曲目加入待播放队列。
搜索音乐时,使用带有类型过滤器(track、album、artist、playlist)的Spotify搜索API以获取精准结果。展示搜索结果时需包含艺术家名称、曲目/专辑标题和时长。对于播放列表管理,可创建、修改和重新排序播放列表。添加曲目时,除非用户明确要求,否则需检查是否存在重复曲目。
获取推荐时,使用recommendations端点,结合种子曲目、艺术家或流派,以及可调节属性(energy、danceability、tempo、valence)来匹配用户的心情或活动场景。展示推荐内容时需提供足够的上下文信息(流派、流行度、预览),以便用户做出合理选择。

Examples

示例

  • "Play 'Bohemian Rhapsody' by Queen"
  • "Skip to the next track"
  • "Create a playlist called 'Morning Focus' with chill electronic tracks"
  • "What's currently playing?"
  • "Recommend upbeat tracks similar to Daft Punk for a workout"
  • "Add this song to my 'Favorites 2026' playlist"
  • "播放Queen的《Bohemian Rhapsody》"
  • "跳至下一曲目"
  • "创建名为'Morning Focus'的播放列表,添加舒缓的电子音乐曲目"
  • "当前正在播放什么?"
  • "推荐类似Daft Punk的upbeat曲目,适合健身时听"
  • "将这首歌添加到我的'Favorites 2026'播放列表"

Constraints

限制条件

  • Playback control requires Spotify Premium on the target account.
  • An active Spotify device (app, web player, smart speaker) must be open for playback commands.
  • OAuth scopes needed:
    user-modify-playback-state
    ,
    user-read-playback-state
    ,
    playlist-modify-public
    ,
    playlist-modify-private
    ,
    user-library-read
    .
  • Spotify API rate limits apply; batch operations when possible.
  • 30-second preview URLs are available for most tracks but full playback requires the Spotify client.
  • Cannot download or export audio files.
  • 播放控制需要目标账户拥有Spotify Premium权限。
  • 执行播放命令前必须打开一个活跃的Spotify设备(应用、网页播放器、智能音箱)。
  • 所需OAuth权限范围:
    user-modify-playback-state
    ,
    user-read-playback-state
    ,
    playlist-modify-public
    ,
    playlist-modify-private
    ,
    user-library-read
  • Spotify API存在调用速率限制;尽可能批量执行操作。
  • 大多数曲目提供30秒预览URL,但完整播放需要使用Spotify客户端。
  • 无法下载或导出音频文件。