# Alexa Linux

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](https://github.com/alexa/alexa-avs-sample-app/wiki/Create-Security-Profile).\
   Add <http://alexa.local:3000/authresponse> to the Allowed Return URLs and [http://alexa.local:3000](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. Clone Git on your Desktop

> \~$ git clone <https://github.com/devicehive/AlexaDevice.git>

1. Install dependencies &#x20;

> ```
> sudo apt install python3-pip git ffmpeg swig libportaudio2 portaudio19-dev libpulse-dev
> ```
>
> ```
> sudo pip3 install requests 'git+https://github.com/moaxey/python-zeroconf' pocketsphinx pyaudio
> ```

1. Run

> cd AlexaDevice/
>
> python3 alexa.py

1. Open <http://alexa.local:3000> in web browser on local device or device in the same network.
2. Fill device credentials which was created in step 1, click 'log in'. *Note Voice detection threshold is float value for adjusting*&#x20;

   &#x20;*voice detection.*
3. Fill your amazon credentials.
4. Now you can speak with Alexa. App uses voice activation. Say 'Alexa' and phrase that you want to say to her. App makes beep in speakers when it hear 'Alexa' keyword and start recording.

\*\*\*\*\*\*Note

Make sure your system has PulseAudio support.

## Edit Alexa to Lupe

Open alexa\_audio.py

> \~$ cd AlexaDevice
>
> nano alexa\_audio.py

Edit and change alexa for the name you want to call it.
