-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f786bc8
commit ceda62d
Showing
84 changed files
with
469 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Changelog | ||
|
||
## 1.5.0 | ||
|
||
- Remove webrtc (done in core now) | ||
- Remove audio options related to webrtc | ||
- Remove wake word option (dynamic loading) | ||
- Dynamically load wake word models | ||
|
||
## 1.4.0 | ||
|
||
- Add noise suppression/auto gain with webrtc | ||
|
||
## 1.1.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Home Assistant Add-on: porcupine1 | ||
|
||
## Installation | ||
|
||
Follow these steps to get the add-on installed on your system: | ||
|
||
1. Navigate in your Home Assistant frontend to **Settings** -> **Add-ons** -> **Add-on store**. | ||
2. Add the store https://github.com/rhasspy/hassio-addons | ||
2. Find the "porcupine1" add-on and click it. | ||
3. Click on the "INSTALL" button. | ||
|
||
## How to use | ||
|
||
After this add-on is installed and running, it will be automatically discovered | ||
by the Wyoming integration in Home Assistant. To finish the setup, | ||
click the following my button: | ||
|
||
[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=wyoming) | ||
|
||
Alternatively, you can install the Wyoming integration manually, see the | ||
[Wyoming integration documentation](https://www.home-assistant.io/integrations/wyoming/) | ||
for more information. | ||
|
||
## Configuration | ||
|
||
### Option: `sensitivity` | ||
|
||
Activation threshold (0-1), where higher means fewer activations. | ||
|
||
### Option: `debug_logging` | ||
|
||
Enable debug logging. Useful for seeing satellite connections and each wake word detection in the logs. | ||
|
||
## Support | ||
|
||
Got questions? | ||
|
||
You have several options to get them answered: | ||
|
||
- The [Home Assistant Discord Chat Server][discord]. | ||
- The Home Assistant [Community Forum][forum]. | ||
- Join the [Reddit subreddit][reddit] in [/r/homeassistant][reddit] | ||
|
||
In case you've found an bug, please [open an issue on our GitHub][issue]. | ||
|
||
[discord]: https://discord.gg/c5DvZ4e | ||
[forum]: https://community.home-assistant.io | ||
[issue]: https://github.com/home-assistant/addons/issues | ||
[reddit]: https://reddit.com/r/homeassistant | ||
[repository]: https://github.com/hassio-addons/repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
ARG BUILD_FROM | ||
FROM ${BUILD_FROM} | ||
|
||
# Set shell | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Install porcupine1 | ||
WORKDIR /usr/src | ||
ENV PIP_BREAK_SYSTEM_PACKAGES=1 | ||
|
||
COPY ./src/ ./ | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
netcat-traditional \ | ||
python3 \ | ||
python3-pip \ | ||
\ | ||
&& pip3 install --no-cache-dir -U \ | ||
setuptools \ | ||
wheel \ | ||
&& pip3 install --no-cache-dir \ | ||
--extra-index-url https://www.piwheels.org/simple \ | ||
'numpy<1.26' \ | ||
-r requirements.txt \ | ||
\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR / | ||
COPY rootfs / | ||
|
||
HEALTHCHECK --start-period=10m \ | ||
CMD echo '{ "type": "describe" }' \ | ||
| nc -w 1 localhost 10400 \ | ||
| grep -iq "porcupine1" \ | ||
|| exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Home Assistant Add-on: porcupine1 | ||
|
||
![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armv7 Architecture][armv7-shield] | ||
|
||
Home Assistant add-on that uses [porcupine1](https://github.com/Picovoice/porcupine) for wake word detection. | ||
|
||
Part of the [Year of Voice](https://www.home-assistant.io/blog/2022/12/20/year-of-voice/). | ||
|
||
Requires Home Assistant 2023.9 or later. | ||
|
||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg | ||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg | ||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg | ||
[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg | ||
[i386-shield]: https://img.shields.io/badge/i386-no-red.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
build_from: | ||
amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm | ||
aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm | ||
codenotary: | ||
signer: notary@home-assistant.io | ||
base_image: notary@home-assistant.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
version: 1.0.0 | ||
slug: porcupine1 | ||
name: porcupine1 | ||
description: porcupine1 using the Wyoming protocol | ||
url: https://github.com/rhasspy/hassio-addons/tree/master/porcupine1 | ||
arch: | ||
- amd64 | ||
- aarch64 | ||
- armv7 | ||
init: false | ||
discovery: | ||
- wyoming | ||
options: | ||
sensitivity: 0.5 | ||
debug_logging: false | ||
schema: | ||
sensitivity: float | ||
debug_logging: bool | ||
ports: | ||
"10400/tcp": null | ||
homeassistant: 2023.9.0 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Sends discovery information to Home Assistant. | ||
# ============================================================================== | ||
declare config | ||
|
||
# Wait for porcupine1 to become available | ||
bash -c \ | ||
"until | ||
echo '{ \"type\": \"describe\" }' | ||
> /dev/tcp/localhost/10400; do sleep 0.5; | ||
done" > /dev/null 2>&1 || true; | ||
|
||
config=$(\ | ||
bashio::var.json \ | ||
uri "tcp://$(hostname):10400" \ | ||
) | ||
|
||
if bashio::discovery "wyoming" "${config}" > /dev/null; then | ||
bashio::log.info "Successfully sent discovery information to Home Assistant." | ||
else | ||
bashio::log.error "Discovery message to Home Assistant failed!" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/discovery/run |
Empty file.
26 changes: 26 additions & 0 deletions
26
porcupine1/rootfs/etc/s6-overlay/s6-rc.d/porcupine1/finish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Take down the S6 supervision tree when service fails | ||
# s6-overlay docs: https://github.com/just-containers/s6-overlay | ||
# ============================================================================== | ||
declare exit_code | ||
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode) | ||
readonly exit_code_service="${1}" | ||
readonly exit_code_signal="${2}" | ||
|
||
bashio::log.info \ | ||
"Service exited with code ${exit_code_service}" \ | ||
"(by signal ${exit_code_signal})" | ||
|
||
if [[ "${exit_code_service}" -eq 256 ]]; then | ||
if [[ "${exit_code_container}" -eq 0 ]]; then | ||
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode | ||
fi | ||
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt | ||
elif [[ "${exit_code_service}" -ne 0 ]]; then | ||
if [[ "${exit_code_container}" -eq 0 ]]; then | ||
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode | ||
fi | ||
exec /run/s6/basedir/bin/halt | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/command/with-contenv bashio | ||
# shellcheck shell=bash | ||
# ============================================================================== | ||
# Start porcupine1 service | ||
# ============================================================================== | ||
flags=() | ||
|
||
if bashio::config.true 'debug_logging'; then | ||
flags+=('--debug') | ||
fi | ||
|
||
exec python3 /usr/src/server.py \ | ||
--uri 'tcp://0.0.0.0:10400' \ | ||
--sensitivity "$(bashio::config 'sensitivity')" ${flags[@]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.58 KB
porcupine1/src/data/resources/de/raspberry-pi/ananas_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.88 KB
porcupine1/src/data/resources/de/raspberry-pi/heuschrecke_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.91 KB
porcupine1/src/data/resources/de/raspberry-pi/himbeere_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.58 KB
porcupine1/src/data/resources/de/raspberry-pi/leguan_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3.36 KB
porcupine1/src/data/resources/de/raspberry-pi/stachelschwein_raspberry-pi.ppn
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+25 KB
porcupine1/src/data/resources/en/raspberry-pi/americano_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.81 KB
porcupine1/src/data/resources/en/raspberry-pi/blueberry_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+6.42 KB
porcupine1/src/data/resources/en/raspberry-pi/bumblebee_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+4.07 KB
porcupine1/src/data/resources/en/raspberry-pi/computer_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.97 KB
porcupine1/src/data/resources/en/raspberry-pi/grapefruit_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3 KB
porcupine1/src/data/resources/en/raspberry-pi/grasshopper_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3.87 KB
porcupine1/src/data/resources/en/raspberry-pi/hey google_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.65 KB
porcupine1/src/data/resources/en/raspberry-pi/hey siri_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3.48 KB
porcupine1/src/data/resources/en/raspberry-pi/jarvis_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+4.1 KB
porcupine1/src/data/resources/en/raspberry-pi/ok google_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.97 KB
porcupine1/src/data/resources/en/raspberry-pi/pico clock_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+5.9 KB
porcupine1/src/data/resources/en/raspberry-pi/picovoice_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+11.1 KB
porcupine1/src/data/resources/en/raspberry-pi/porcupine_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+9.16 KB
porcupine1/src/data/resources/en/raspberry-pi/terminator_raspberry-pi.ppn
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.23 KB
porcupine1/src/data/resources/es/raspberry-pi/emparedado_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.91 KB
porcupine1/src/data/resources/es/raspberry-pi/leopardo_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.75 KB
porcupine1/src/data/resources/es/raspberry-pi/manzana_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3.26 KB
porcupine1/src/data/resources/es/raspberry-pi/murciélago_raspberry-pi.ppn
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.97 KB
porcupine1/src/data/resources/fr/raspberry-pi/framboise_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+3.81 KB
porcupine1/src/data/resources/fr/raspberry-pi/mon chouchou_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.94 KB
porcupine1/src/data/resources/fr/raspberry-pi/parapluie_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.68 KB
porcupine1/src/data/resources/fr/raspberry-pi/perroquet_raspberry-pi.ppn
Binary file not shown.
Binary file added
BIN
+2.94 KB
porcupine1/src/data/resources/fr/raspberry-pi/tournesol_raspberry-pi.ppn
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pvporcupine~=1.9.0 | ||
wyoming==1.2.0 |
Oops, something went wrong.