Install Alexa on Raspberry Pi 4

preview_player
Показать описание
Here's how you can turn your raspberry pi 4 (or 3) into an Amazon Alexa. It's even easier than a Google Assistant and has lots of applications.

I may earn commission if you purchase from the links below:

INSTRUCTIONS:
0:00 Intro

4:20 Access your pi's terminal - I'm using ssh

4:38 Run in the terminal:
cd /home/pi/
mkdir sdk-folder

cd sdk-folder
mkdir sdk-build sdk-source third-party sdk-install db

cd /home/pi/
sudo apt-get update

sudo apt-get -y install \
git gcc cmake build-essential libsqlite3-dev libcurl4-openssl-dev libfaad-dev \
libssl-dev libsoup2.4-dev libgcrypt20-dev libgstreamer-plugins-bad1.0-dev \
libnghttp2-dev nghttp2 gstreamer1.0-plugins-good libasound2-dev doxygen

cd /home/pi/sdk-folder/third-party
cd portaudio
./configure --without-jack
make

cd /home/pi/sdk-folder/third-party
cd curl-7.67.0
./configure --with-nghttp2 --prefix=/home/pi/sdk-folder/third-party/curl-7.67.0 --with-ssl
make

6:13 Download and build the AVS Device SDK
cd /home/pi/sdk-folder/sdk-source
cd /home/pi/sdk-folder/sdk-build
cmake /home/pi/sdk-folder/sdk-source/avs-device-sdk \
-DGSTREAMER_MEDIA_PLAYER=ON \
-DPORTAUDIO=ON \
-DPKCS11=OFF \
-DPORTAUDIO_LIB_PATH=/home/pi/sdk-folder/third-party/portaudio/lib/.libs/libportaudio.a \
-DPORTAUDIO_INCLUDE_DIR=/home/pi/sdk-folder/third-party/portaudio/include \
-DCURL_INCLUDE_DIR=/home/pi/sdk-folder/third-party/curl-7.67.0/include/curl \

Build the sample app (or just run "make" to build the whole SDK)
make SampleApp

On my remote machine I run:

8:40 Generate config

cd /home/pi/sdk-folder/sdk-source/avs-device-sdk/tools/Install

/home/pi/sdk-folder/db \
/home/pi/sdk-folder/sdk-source/avs-device-sdk \
-DSDK_CONFIG_MANUFACTURER_NAME="raspberrypi" \
-DSDK_CONFIG_DEVICE_DESCRIPTION="raspberrypi"

9:08 Set up audio:

Then add
"gstreamerMediaPlayer":{
"audioSink":"alsasink"
},

to the space above "cblAuthDelegate"
Ctrl + S to save then Ctrl + X to exit the nano editor

Run the following to find your card and device numbers:
aplay -l
arecord -l

Make a .asoundrc file:
sudo nano ~/.asoundrc

Copy and paste the following (changing card and device numbers if necessary):
pcm.!default {
type asym
type plug
}
type plug
}
}

Ctrl + S to save Ctrl + X to exit

Kill pulseaudio: pulseaudio -k

Authorize and run your Alexa:
cd /home/pi/sdk-folder/sdk-build

I hope you found this helpful! Happy coding
Рекомендации по теме
Комментарии
Автор

Sam, a great tutorial as always! Can you please let me know if this project supports music playback? Can I expect same features that Echo offers?

onkarbatra
Автор

keep it up bro it isn't the first video is see for you and honestly you are sharing some special information with a very clear way, all the love from Egypt

ahmedadel
Автор

I thought you had at least one 100k subs! Amazing content and explanation. Keep it up!

larszxda
Автор

Please make another video with latest options

draco
Автор

Hey thanks for the video! I'm installing on a different SBC: Orange Pi PC with Armbian (Raspbian-like). The installation process is complete, and it seems to be running, I can even find it in the Alexa Android app. But when I say something into the microphone I don't get any sound. Any idea? Does Alexa use Pulseaudio or Alsamixer?

RodrigoJustideOliveira
Автор

Great video !
I managed to make it work here at home.
But I live, I ask in Portuguese Brazil and Alexa is answering me in English. Question: how do I keep asking Alexa questions in Brazilian Portuguese?
answer me in my language Brazilian Portuguese

tiagosoares
Автор

I am going to build this
I have some doubts
1. How can I add notification ring
2. How can I use raspberry pi as bluetooth audio receiver
3. Can we able to connect this with alexa app

sanskarmudgal
Автор

Hi, how did you make the SDK interact with the home automation objects? I tried to start the sdk but it says only certified devices can do this.

lastcouponbonus
Автор

Hi, I like your video a lot and it helped me set up alexa successfully. However, I've tried to follow through your link using snowboy but it seem to be outdated and might not able to support any problem that could occur. Can you suggest me some other ways of enabling wake word? Much appreciated

duongvuong
Автор

I got my alexa up and running. But how to support music playback. Please help.

paarthmittal
Автор

I tried to recreate the project but failed the AVS is no longer free 😢

MTEX-trvd
Автор

Bro i getting error in step 7. "-bash: ./SampleApp/src/SampleApp: No such file or directory" . How to fix it bro and I using raspberry pi3B, Debian version: 10 (buster) 32-bit

avinashj
Автор

It's works on pi 0w .. process is slow but it work..

creatvitylight
Автор

Very good explanation. It worked for me. One q can you please tell how to install setup for activate sensory alexa wake up word instead of t command

AK-ksgp
Автор

Hey, what codes will I need to add for it to start on boot?
Hope to hear from you soon.

alangeorge
Автор

How can I use the app to autorun in boot and run in the background with wakeword?

aadhilthanseer
Автор

its a amazing video bro...i have a q what is the difference between sdk and sdk sample app..?

balaviswanth
Автор

Every time giving t command, can we setup push button for it

dhairyasheelmane
Автор

Hello, I am from India. getting error "bash: cmake: command not found". Please replay. Thanks in advence

surendrakumarsahoo
Автор

How to change the location from America Vancouver to my country i tried to change but after running sample command it gets back to America 🤦🏽‍♂️ help!
And can u make ur own video clearly that with entering t how to start the assistant. The video u suggested of kittai is little confusing. U solve the t problem using ur method so its easy for us to understand.
And also the start assistant at boot.
I think u should make video n attach it the same tutorial n upload again solving our problem.👍🏽
Thx buddy lived ur videos 🔥😍

domnick