{"id":16875049,"url":"https://github.com/dlsniper/phas","last_synced_at":"2025-09-08T13:40:58.142Z","repository":{"id":49150958,"uuid":"216424144","full_name":"dlsniper/phas","owner":"dlsniper","description":"Personal Home Automation System","archived":false,"fork":false,"pushed_at":"2021-06-26T08:59:11.000Z","size":6951,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T12:04:16.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dlsniper.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":"2019-10-20T20:36:50.000Z","updated_at":"2025-01-16T01:30:52.000Z","dependencies_parsed_at":"2022-08-25T15:21:48.481Z","dependency_job_id":null,"html_url":"https://github.com/dlsniper/phas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dlsniper/phas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsniper%2Fphas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsniper%2Fphas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsniper%2Fphas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsniper%2Fphas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlsniper","download_url":"https://codeload.github.com/dlsniper/phas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsniper%2Fphas/sbom","scorecard":{"id":347318,"data":{"date":"2025-08-11","repo":{"name":"github.com/dlsniper/phas","commit":"a9a8b8de0592a37c790b5f5929bfa96e9a90e96d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: License:0","Info: FSF or OSI recognized license: Apache License 2.0: License:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":3,"reason":"binaries present in source code","details":["Warn: binary detected: lib/linux/libpv_porcupine.so:1","Warn: binary detected: lib/macos/libpv_porcupine.dylib:1","Warn: binary detected: lib/raspberrypi_a53/libpv_porcupine.so:1","Warn: binary detected: lib/raspberrypi_a7/libpv_porcupine.so:1","Warn: binary detected: lib/raspberrypi_arm11/libpv_porcupine.so:1","Warn: binary detected: lib/raspberrypi_arm72/libpv_porcupine.so:1","Warn: binary detected: lib/windows/libpv_porcupine.dll:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:24:55.649Z","repository_id":49150958,"created_at":"2025-08-18T07:24:55.650Z","updated_at":"2025-08-18T07:24:55.650Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274195170,"owners_count":25239146,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-13T15:34:58.020Z","updated_at":"2025-09-08T13:40:58.088Z","avatar_url":"https://github.com/dlsniper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Personal Home Automation Service\n\n## Installation\n\nYou can use PHAS on Raspberry Pi, but also on your personal computer.\n\nBelow you'll find installation instructions for all supported platforms:\n\n- [Linux - Raspberry Pi and Desktop](#Linux)\n- [Windows](#Windows)\n- [macOS](#macOS)\n\n### Linux\n\nThese instructions apply both to Raspberry Pi and Desktop distributions of Linux (tested under Debian and Ubuntu).\n\nFirst, make sure the system is up to date by using the following commands:\n```shell script\nsudo apt-get update\nsudo apt-get upgrade\n```\n\nThen, install Go 1.13.3 or newer installed from the binary distribution.\nWhile Go 1.11 is still supported, it's better to use a newer version of\nGo and benefit from all the improvements in Go Modules, compilation\nspeed and debugging experience.\n\nFor Raspberry Pi, use the below Go distribution. If you are on a Linux Desktop,\nthen skip to the Linux Desktop instructions below this section.\n\n```shell script\ncd /tmp\nwget https://dl.google.com/go/go1.13.3.linux-armv6l.tar.gz\ntar -zxvf go1.13.3.linux-armv6l.tar.gz\nsudo mv go /usr/local/\nrm go1.13.3.linux-armv6l.tar.gz\n```\n\nFor Linux Desktop, you can skip this if you are on a Raspberry Pi.\n```shell script\ncd /tmp\nwget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz\ntar -zxvf go1.13.3.linux-amd64.tar.gz\nsudo mv go /usr/local/\nrm go1.13.3.linux-amd64.tar.gz\n```\n\nManually add Go's binary files, and your `$GOPATH/bin` binaries to your `$PATH`.\nE.g., place `export PATH=\"${PATH}:/usr/local/go/bin:/home/pi/go/bin\"` at the end of `~/.bash_profile` such as:\n```shell script\n# Include the Go SDK and GOPATH/bin in PATH\nexport PATH=\"${PATH}:/usr/local/go/bin:/home/pi/go/bin\"\n```\n\nIf the file does not exist, then create it.\n\nNow, let's install PHAS:\n\n```shell script\n# clone this repository\ngit clone https://github.com/dlsniper/phas.git /home/pi/phas\ncd /home/pi/phas\n\n# Copy the required system libraries in the correct paths.\n# You can skip these if you will always use the build commands with the correct CGO environment variables configured, see below.\nsudo cp ./lib/picovoice.h /usr/local/include/\nsudo cp ./lib/pv_porcupine.h /usr/local/include/\n\n# If you are on Linux Desktop, then replace raspberrypi_arm11 with linux\nsudo cp ./lib/raspberrypi_arm11/libpv_porcupine.* /usr/local/lib/\n\n# Enable the vendoring mode for Go Modules so that no additional downloads\n# are needed to compile the application\nexport GOFLAGS=-mod=vendor\n\n# This is the target on which PHAS runs. The following values are useful:\n# windows     - for Windows OS\n# macos       - for macOS\n# raspberrypi - for Raspberry PI 3 Linux OS\n# linux       - for Linux OS\nexport PHAS_OS=raspberrypi\n\n# Build the binary\ngo build -o phas\n```\n\n#### Linux Destkop\n\nYou need to install the following dependencies:\n\n```shell script\napt-get install pkg-config portaudio19-dev\n```\n\n### Windows\n\nFor a Windows user, the compilation will be a bit more tricky.\n\nFirst, you need to have [msys2](https://www.msys2.org/) installed.\n\nAdd `C:\\msys64\\mingw64\\bin` to your Windows `PATH` environment variable\n\nThen, open the `MSYS2 MinGW 64-bit` command prompt and run the following commands:\n\n```shell script\n# Ensure msys2 is updated. You might need to run this command a couple of times\npacman -Syu\n\n# Install build tools dependencies\npacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config\n\n# Install the dependency for recording audio from the microphone\npacman -S mingw-w64-x86_64-portaudio\n```\n\n#### Building on Windows\n\nBuilding PHAS on Windows needs to be performed like this:\n\n- set the following environment variables:\n```shell script\nexport CGO_CFLAGS=-I/Users/florin/phas/lib\nexport CGO_LDFLAGS=-L/Users/florin/phas/lib/macos\n```\nAlso, include `C:\\msys64\\mingw64\\bin` in your PATH on Windows.\n\nFor PHAS to work, you need to configure the following environment variable `PHAS_OS=raspberrypi`.\n\n- then run `go build -o phas`\n\n### macOS\n\nFor macOS, you need to run the following commands:\n\n```shell script\nbrew install portaudio pkg-config\n```\n\nDuring the compilation step, you also need to set the following environment variable:\n\n```shell script\nexport CGO_CFLAGS=-I/Users/florin/phas/lib\nexport CGO_LDFLAGS=-L/Users/florin/phas/lib/macos\nexport DYLD_LIBRARY_PATH=\"${DYLD_LIBRARY_PATH}:/Users/florin/phas/lib/macos/\"\n```\n\n## Getting GCP credentials for the voice APIs\n\nBefore we can run the application, we need to get valid GCP credentials\nto make use of the voice APIs.\n\nIf you don't yet have a Google Cloud Platform account yet, then first head over\n[to this link and create one](https://console.cloud.google.com/projectcreate).\n\nThen, read the link here about [obtaining and providing service account credentials manually](https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually).\nSelect ` Service User | API Keys Viewer ` from the ` Role ` and the ` json ` format.\n\nAfter this, go to [APIs \u0026 Services](https://console.cloud.google.com/apis/dashboard)\nand select ` +Enable APIs and Services` button. Here, you'll need to enable\nthe following services:\n- ` Cloud Speech-to-Text API `, ` Cloud Speech-to-Text API Length Standard `\noption should be enough\n- ` Cloud Text-to-Speech API `, ` WaveNet ` option should be enough\n\nFinally, place the downloaded file in a location such as ` /home/pi/phas-gcp-key.json `.\nThen, add the following environment variables to your ` .bash_profile `:\n\n```shell script\n# These are needed to tell PHAS what GCP project to use and what credentials\nexport GCP_PROJECT_ID=\u003cyour GCP project ID\u003e\nexport GOOGLE_APPLICATION_CREDENTIALS=\"/home/pi/phas-gcp-key.json\"\n```\n\nIf you are on Windows, then place the file under `C:\\Users\\\u003cusername\u003e\\phas-gcp-key.json`\nand then set the environment variables accordingly:\n```\nGCP_PROJECT_ID=\u003cyour GCP project ID\u003e\nGOOGLE_APPLICATION_CREDENTIALS=\"/home/pi/phas-gcp-key.json\"\n```\n\n## Running the application\n\nSince we installed all dependencies and everything is up to date,\nlet's run the application. Execute `.\\phas.exe` if you are Windows,\nand `./phas` if you are on all other supported platforms.\n\n## License \n\nThis repository and all code from it is licensed under the [Apache 2 license](License).\n\nThe code under `lib` directory belongs to the [Picovoice](https://picovoice.ai/)\n[Porcupine library](https://github.com/Picovoice/Porcupine), also available\nunder Apache 2 license.\n\nThe code under the `vendor` directory belongs to their original creators and\nis available under their respective license. It is included here to enable the\nsmooth operation of the workshop.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsniper%2Fphas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlsniper%2Fphas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsniper%2Fphas/lists"}