{"id":15580479,"url":"https://github.com/toabctl/soundkid","last_synced_at":"2026-05-20T06:03:32.310Z","repository":{"id":45109204,"uuid":"326223821","full_name":"toabctl/soundkid","owner":"toabctl","description":"a spotify music player for kids","archived":false,"fork":false,"pushed_at":"2022-01-07T21:43:49.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-21T18:12:50.504Z","etag":null,"topics":["do-it-yourself","dyi","kids","librespot","music","music-player","phoniebox","raspberry-pi","raspberrypi","rfid-reader","rust","spotify","spotify-music-player","toniebox"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toabctl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-02T16:31:08.000Z","updated_at":"2022-09-08T08:46:46.000Z","dependencies_parsed_at":"2022-09-12T17:50:24.096Z","dependency_job_id":null,"html_url":"https://github.com/toabctl/soundkid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fsoundkid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fsoundkid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fsoundkid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toabctl%2Fsoundkid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toabctl","download_url":"https://codeload.github.com/toabctl/soundkid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243672487,"owners_count":20328768,"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","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":["do-it-yourself","dyi","kids","librespot","music","music-player","phoniebox","raspberry-pi","raspberrypi","rfid-reader","rust","spotify","spotify-music-player","toniebox"],"created_at":"2024-10-02T19:28:05.552Z","updated_at":"2026-05-20T06:03:32.305Z","avatar_url":"https://github.com/toabctl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# soundkid - a spotify music player for kids\n\nsoundkid is software that can be used by kids for playing music from\n[Spotify](https://www.spotify.com/) without using a complicated interface\nlike a display. Instead it can be used with a RFID Reader\n(I'm currently using a [Neuftech USB RFID Reader](https://www.amazon.de/Neuftech-Reader-Kartenleseger%C3%A4t-Kartenleser-Kontaktlos/dp/B018OYOR3E)) to interact with the music box.\n\nsoundkid is inspired by [Phoniebox](http://phoniebox.de/)\nand [Toniebox](https://tonies.de/) and uses\n[librespot](https://github.com/librespot-org/librespot) to interact with Spotify.\nI started my own project instead of using Phoniebox to learn more about the\n[Rust language](https://www.rust-lang.org/).\n\n## Overview\n\n`soundkid` reads a YAML configuration file, watches the configured input\ndevices (RFID/keyboard via evdev, GPIO buttons via gpio-cdev), and dispatches\neach event to either Spotify playback (via librespot) or ALSA volume control\n(via `amixer`). Spotify playback runs in-process — there is no separate\n`soundkid-player` binary anymore.\n\n## Authentication\n\nSpotify removed username/password authentication. soundkid now uses OAuth +\na credentials cache:\n\n1. The first time you run soundkid it will print an authorization URL and\n   (best-effort) open it in a browser. Sign in to Spotify; the app gets an\n   access token.\n2. The reusable credentials returned by the access point are persisted to the\n   configured `cache_dir` so subsequent starts connect headlessly without a\n   browser.\n\nRun the first OAuth login interactively (e.g. `cargo run --bin soundkid` on\nyour desktop, or `systemctl stop soundkid \u0026\u0026 sudo -u soundkid soundkid` on the\ntarget) before relying on the systemd service.\n\nSpotify Premium is required.\n\n## Configuration\n\nsoundkid looks for `~/.soundkid.conf` first, then `/etc/soundkid.conf`.\nThe first one that reads and parses cleanly wins.\n\n```yaml\n---\ngpio:  # optional\n  \"/dev/gpiochip0\":\n    5: \"VOLUME_DECREASE\"\n    6: \"VOLUME_INCREASE\"\ninput:  # optional\n  \"HXGCoLtd Keyboard\":\n    \"00000044886655661122\": \"spotify:playlist:43nVldajDhG1YVwZKxVh\"\n    \"00000011559977882233\": \"https://open.spotify.com/album/7LQhG0xSDjFiKJnziyB3Zj?si=eFQbWbq0Q16q6Go8tjlCvw\"\n    \"00000044772255668801\": \"PAUSE\"\n    \"00000011666611330099\": \"RESUME\"\n    \"00000011666611330100\": \"VOLUME_INCREASE\"\n    \"00000011666611330101\": \"VOLUME_DECREASE\"\nalsa:\n  control: \"SoftMaster\"     # optional, default \"Master\"\nspotify:\n  cache_dir: \"/var/lib/soundkid\"   # optional, default ~/.cache/soundkid\n  client_id: \"...\"                 # optional, default librespot's keymaster id\n```\n\n`gpio` maps a GPIO chip path → line offset → action.\n\n`input` maps a device name (or `/dev/input/event*` path; `sudo evtest` lists\navailable devices) → scanned-id-string → action.\n\n`alsa.control` is the mixer control name used by `amixer set \u003ccontrol\u003e\n5%+/5%-` (try `amixer` to list available controls).\n\n`spotify.cache_dir` is where reusable credentials are stored after the first\nOAuth login.\n\n### Actions\n\nAction values are validated at config load — typos are rejected at startup\nrather than at first card scan.\n\n- `VOLUME_INCREASE` — `amixer set \u003calsa.control\u003e 5%+`\n- `VOLUME_DECREASE` — `amixer set \u003calsa.control\u003e 5%-`\n- `PAUSE` — pause Spotify playback\n- `RESUME` — resume Spotify playback\n- A Spotify URI (`spotify:track:...`, `spotify:album:...`, `spotify:playlist:...`)\n- An `https://open.spotify.com/...` URL (query strings like `?si=...` are stripped)\n\n## Building\n\nYou'll need ALSA development headers:\n\n```\n# Debian/Ubuntu\nsudo apt-get install build-essential libasound2-dev\n# openSUSE\nsudo zypper install alsa-devel\n# Fedora\nsudo dnf install alsa-lib-devel make gcc\n```\n\nThen:\n\n```\ncargo build --release\n```\n\n## Debugging\n\n```\nRUST_BACKTRACE=full RUST_LOG=debug cargo run --bin soundkid\n```\n\n## Building a .deb package\n\n```\ncargo install cargo-deb\ncargo deb\n```\n\n## Contributions\n\nPlease use [github pull requests](https://github.com/toabctl/soundkid/pulls)\nfor code/doc changes and [github issues](https://github.com/toabctl/soundkid/issues)\nto report problems or ask questions.\n\n## License\n\nThe code is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoabctl%2Fsoundkid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoabctl%2Fsoundkid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoabctl%2Fsoundkid/lists"}