{"id":16406192,"url":"https://github.com/itchyny/volume-go","last_synced_at":"2025-03-16T16:32:01.216Z","repository":{"id":39833765,"uuid":"94603158","full_name":"itchyny/volume-go","owner":"itchyny","description":"Cross-platform audio volume control library for Go","archived":false,"fork":false,"pushed_at":"2022-06-25T04:47:29.000Z","size":67,"stargazers_count":111,"open_issues_count":0,"forks_count":20,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-16T04:03:31.076Z","etag":null,"topics":["audio","golang","golang-library","volume","volume-control"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/itchyny/volume-go?tab=doc","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itchyny.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":"2017-06-17T05:37:02.000Z","updated_at":"2025-03-10T10:51:16.000Z","dependencies_parsed_at":"2022-07-30T22:07:59.909Z","dependency_job_id":null,"html_url":"https://github.com/itchyny/volume-go","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fvolume-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fvolume-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fvolume-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itchyny%2Fvolume-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itchyny","download_url":"https://codeload.github.com/itchyny/volume-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243896503,"owners_count":20365387,"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":["audio","golang","golang-library","volume","volume-control"],"created_at":"2024-10-11T06:08:55.417Z","updated_at":"2025-03-16T16:32:00.892Z","avatar_url":"https://github.com/itchyny.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# volume-go\n[![CI Status](https://github.com/itchyny/volume-go/workflows/CI/badge.svg)](https://github.com/itchyny/volume-go/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/itchyny/volume-go)](https://goreportcard.com/report/github.com/itchyny/volume-go)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/itchyny/volume-go/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/itchyny/volume-go/all.svg)](https://github.com/itchyny/volume-go/releases)\n[![pkg.go.dev](https://pkg.go.dev/badge/github.com/itchyny/volume-go)](https://pkg.go.dev/github.com/itchyny/volume-go)\n\n### Cross-platform audio volume control library for Go language\nThis is a Go language package for controlling audio volume.\n\n## volume command\n### Homebrew\n```sh\nbrew install itchyny/tap/volume\n```\n\n### Build from source\n```sh\ngo install github.com/itchyny/volume-go/cmd/volume@latest\n```\n\n### Basic usage\n```sh\n $ # Get the current audio volume.\n $ volume get\n20\n\n $ # Set the audio volume.\n $ volume set 40\n $ volume status\nvolume: 40\nmuted: false\n\n $ # Increase/decrease the audio volume.\n $ volume get\n40\n $ volume up\n $ volume get\n46\n\n $ volume down\n $ volume get\n44\n\n $ # Get current audio volume status.\n $ volume status\nvolume: 20\nmuted: false\n\n $ # Mute and unmute.\n $ volume mute\n $ volume status\nvolume: 20\nmuted: true\n\n $ volume unmute\n $ volume status\nvolume: 20\nmuted: false\n```\n\n## Package usage\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/itchyny/volume-go\"\n)\n\nfunc main() {\n\tvol, err := volume.GetVolume()\n\tif err != nil {\n\t\tlog.Fatalf(\"get volume failed: %+v\", err)\n\t}\n\tfmt.Printf(\"current volume: %d\\n\", vol)\n\n\terr = volume.SetVolume(10)\n\tif err != nil {\n\t\tlog.Fatalf(\"set volume failed: %+v\", err)\n\t}\n\tfmt.Printf(\"set volume success\\n\")\n\n\terr = volume.Mute()\n\tif err != nil {\n\t\tlog.Fatalf(\"mute failed: %+v\", err)\n\t}\n\n\terr = volume.Unmute()\n\tif err != nil {\n\t\tlog.Fatalf(\"unmute failed: %+v\", err)\n\t}\n}\n```\n\n## Bug Tracker\nReport bug at [Issues・itchyny/volume-go - GitHub](https://github.com/itchyny/volume-go/issues).\n\n## Author\nitchyny (https://github.com/itchyny)\n\n## License\nThis software is released under the MIT License, see LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fvolume-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitchyny%2Fvolume-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitchyny%2Fvolume-go/lists"}