Skip to content

Commit

Permalink
Merge pull request #29 from slackr31337/client-class
Browse files Browse the repository at this point in the history
Add a warning for docker image
  • Loading branch information
slackr31337 authored Aug 13, 2023
2 parents bd101db + cec39de commit 76bacaa
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Required Authentication

- From Picovoice access_key for Porcupine wake word detection
(Please note that your Picovoice user is only allowed one unique device.
Rebuilding the docker image can result in a new device id
that will prevent you from using Picovoice)
Running the docker image can result in a new device
that will prevent you from using Picovoice
See: https://github.com/Picovoice/porcupine/issues/1020)

- From Home-Assistant long-lived access token

Expand Down Expand Up @@ -49,31 +50,12 @@ Run:

python3 ./voice_pipeline.py --server home-assistant.local --pipeline 'OpenAI' --follow-up

Docker:

cd /usr/src
git clone https://github.com/slackr31337/PorcupinePipeline.git

cd PorcupinePipeline
bash build.sh

export ACCESS_KEY='my-picovoice-access-key'
export TOKEN='my-home-assistant-token'

docker run --rm \
--env SERVER=192.168.0.10 \
--env SERVER_PORT=8123 \
--env AUDIO_DEVICE=3 \
--env ACCESS_KEY=${ACCESS_KEY} \
--env TOKEN=${TOKEN} \
--device /dev/snd \
porcupine-pipeline

Tested with:

wyoming-piper <https://hub.docker.com/r/rhasspy/wyoming-piper>
wyoming-whisper <https://hub.docker.com/r/rhasspy/wyoming-whisper>
Home-Assistant 2023.06.1 <https://www.home-assistant.io/>
Home-Assistant 2023.06.1 to 2023.08.2 <https://www.home-assistant.io/>

## Used code from the following projects

Expand Down
3 changes: 0 additions & 3 deletions build.sh

This file was deleted.

23 changes: 23 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Warning: Using a docker image is not recommended with a free picovoice account.


To run in Docker:

cd /usr/src
git clone https://github.com/slackr31337/PorcupinePipeline.git

cd PorcupinePipeline
bash build.sh

export ACCESS_KEY='my-picovoice-access-key'
export TOKEN='my-home-assistant-token'

docker run --rm \
--env SERVER=192.168.0.10 \
--env SERVER_PORT=8123 \
--env AUDIO_DEVICE=3 \
--env ACCESS_KEY=${ACCESS_KEY} \
--env TOKEN=${TOKEN} \
--device /dev/snd \
porcupine-pipeline
8 changes: 8 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

echo "Warning: Using picovoice in a docker container"
echo " will result in consuming a user device"
echo " for each container that is run. This"
echo " will exhaust a free user's monthly limit"

docker build -f Dockerfile -t porcupine-pipeline .

0 comments on commit 76bacaa

Please sign in to comment.