mirror of
https://github.com/Picovoice/porcupine.git
synced 2022-01-28 03:27:53 +03:00
Requirements
sudo apt-get install wiringpi
AccessKey
The Porcupine SDK requires a valid AccessKey at initialization. AccessKeys act as your credentials when using Porcupine SDKs.
You can create your AccessKey for free. Make sure to keep your AccessKey secret.
To obtain your AccessKey:
- Login or Signup for a free account on the Picovoice Console.
- Once logged in, go to the
AccessKeytab to create one or use an existingAccessKey.
Build
From the root of the repository run:
gcc -std=c99 -O3 -o demo/respeaker-rpi0/porcupine_demo_mic \
-I include/ demo/respeaker-rpi0/porcupine_demo_mic.c \
-ldl -lasound -lwiringPi
Run
Below are the colors associated with supported wake words for this demo:
From the root of the repository run:
./demo/respeaker-rpi0/porcupine_demo_mic \
${ACCESS_KEY}
lib/raspberry-pi/arm11/libpv_porcupine.so \
lib/common/porcupine_params.pv \
0.65 \
plughw:CARD=seeed2micvoicec,DEV=0 \
resources/keyword_files/raspberry-pi/alexa_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/computer_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/hey\ google_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/hey\ siri_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/jarvis_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/picovoice_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/porcupine_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/bumblebee_raspberry-pi.ppn \
resources/keyword_files/raspberry-pi/terminator_raspberry-pi.ppn
Wait for the demo to initialize and print [Listening] in the terminal. Say:
Picovoice
The demo outputs:
detected 'Picovoice'
The lights are now set to green. Say:
Alexa
The lights are set to yellow now. Say:
Terminator
to turn off the lights.