{"id":18544747,"url":"https://github.com/131/clap-trigger","last_synced_at":"2025-04-09T19:31:19.974Z","repository":{"id":53976257,"uuid":"49835857","full_name":"131/clap-trigger","owner":"131","description":"Nodejs clap detector","archived":false,"fork":false,"pushed_at":"2021-03-10T18:44:41.000Z","size":9,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-09T20:51:00.172Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/131.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-17T21:14:06.000Z","updated_at":"2018-11-09T15:30:02.000Z","dependencies_parsed_at":"2022-08-13T05:21:17.434Z","dependency_job_id":null,"html_url":"https://github.com/131/clap-trigger","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/131%2Fclap-trigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fclap-trigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fclap-trigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fclap-trigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/clap-trigger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223407820,"owners_count":17140567,"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":[],"created_at":"2024-11-06T20:17:29.097Z","updated_at":"2024-11-06T20:17:29.764Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Clap detection trigger for nodejs\n\n===\n\n# Motivation\nI just bought a Phillips Hue lamp. My son and i want to switch on / off by clapping hands (see working code here http://pastie.org/10692960)\n\nThis module conforms to \"strict minimal composition\" (use browserify and you'll get the tiniest possible code, with all underlying componants fully tested)\n\n\n# How\nThis module relies on sox (\"Swiss Army knife of sound processing programs\").\nSox is available on all platforms.\n\n\n# Windows requirements\nHave sox.exe available in your path (download http://sox.sourceforge.net/)\n\n# Linux requirements\n```\napt-get install sox\ngpasswd -a [username] audio\n```\n\n\n# API\n```\nvar engine  = require('clap-trigger');\n\nvar trigger = new engine(); // options here\n\ntrigger.start(function(){\n  console.log(\"Stopped\")\n});\n \ntrigger.stop(); //stop listening\n\ntrigger.clap(function() {\n  console.log(\"Simple clap here\");\n});\n\ntrigger.claps(2, function() {\n  console.log(\"Double clap here\"); \n});\n\n\n```\n\n# Testing\n```\nnpm test\n\n# current code coverage is 100%\n```\n\n\n\n# Credits\n* Derived from https://github.com/tom-s/clap-detector\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fclap-trigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fclap-trigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fclap-trigger/lists"}