DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. IoT
  4. How to Add Alexa to a Raspberry Pi

How to Add Alexa to a Raspberry Pi

Want to link Alexa with a Raspberry Pi (or any Linux device)? Well, a new open project has made the jump, allowing you to communicate through your device.

Kseniya Savitsina user avatar by
Kseniya Savitsina
·
Sep. 22, 17 · Tutorial
Like (7)
Save
Tweet
Share
11.74K Views

Join the DZone community and get the full member experience.

Join For Free

Voice assistants have definitely become a trend, with options like Google Assistant, Amazon Alexa, and Apple’s Siri. What really separates them from each other is their ecosystems, and this is where Amazon Alexa shines the most.

Amazon provides the API for using its voice service, Alexa. Integrating custom devices with it allows you to bring the full Amazon Echo functionality to those devices and opens a wide range of opportunities both for DIY/PoC and enterprise solutions.

DataArt developed an open solution that allows turning any Linux-based device into an Amazon Echo device. Since Raspberry Pi is the most popular board for IoT projects, we decided to use it in our setup. But basically, any Linux system can run the demo.

Below, you’ll find the latest version of an Amazon Alexa virtual device project (version 1.1). This project aims to provide the ability to bring Alexa to any Linux device, including embedded systems like Raspberry Pi boards.

At the end, you will be able to build a voice-activated, digital home assistant, which will answer a multitude of questions, read books, play music, tell jokes, provide weather, and even more.

The binary release is packed into a snap package, which is a perfect way to deliver this project.

How to Add Alexa to a Raspberry Pi

  1. You need to create your own Alexa Device on the Amazon developer portal. Follow this manual to create your own device and security profile. Add http://alexa.local:3000/authresponse to the Allowed Return URLs and http://alexa.local:3000 to the Allowed-Origins.
  2. Connect an audio device: a microphone and speakers to your device. It could be a USB headset, for example.
  3. Install the PulseAudio snap: sudo snap install --devmode pulseaudio
  4. Install the Alexa snap from the store: sudo snap install --channel beta alexa
  5. Open http://alexa.local:3000 in a web browser on a local device or a device on the same network. Note: The app provides an mDNS advertisement of the local domain alexa.local. This is very helpful for using with monitorless devices.
  6. Fill in the device credentials that were created during step 1, then click ‘log in’. Note: The voice detection threshold is a float value for adjusting voice detection. The smaller the value, the easier it is to trigger. You may need to adjust it for your mic and voice.
  7. Fill in your Amazon credentials.
  8. Now you can speak with Alexa. The app uses voice activation, so say ‘Alexa’ and the phrase that you want to say to her. The app will make a beep via the speakers when it hears the ‘Alexa’ keyword and starts recording.
  9. Enjoy Alexa without the need to buy special hardware.

Written by the DeviceHive team.

raspberry pi

Published at DZone with permission of Kseniya Savitsina. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Why Every Fintech Company Needs DevOps
  • Cloud Native London Meetup: 3 Pitfalls Everyone Should Avoid With Cloud Data
  • Automated Performance Testing With ArgoCD and Iter8
  • Top 5 Node.js REST API Frameworks

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: