Giter Club home page Giter Club logo

bjoernkarmann / project_alias Goto Github PK

View Code? Open in Web Editor NEW
1.7K 71.0 102.0 40.04 MB

Alias is a teachable “parasite” that is designed to give users more control over their smart assistants, both when it comes to customisation and privacy. Through a simple app the user can train Alias to react on a custom wake-word/sound, and once trained, Alias can take control over your home assistant by activating it for you.

License: GNU General Public License v3.0

HTML 26.09% JavaScript 16.12% CSS 11.41% Python 46.38%
machine-learning classification sound-synthesis speech-recognition hack smarthome alias wakeword raspberry-pi microphone

project_alias's Introduction

Project Alias 2.0

Python 3.6 License: GPL

Project Alias is an open-source parasite to hack smart home devices. Train custom wake-up names and commands for your devices while disturbing their built-in microphone with noise. Introduce false labelling to their algorithm by changing gender or nationality. Read more about the project here

This repository has been updated to 2.0. Find the old version under the branches

2.0 Features

  • Multiple wake-up words
  • Custom commands to be told to the assistant
  • Change gender and language of Alias
  • Adjust wake-up word sensitivity and delay
  • New wake-up word detection powered by Pocketsphinx

Build Guide

For the complete step-by-step guide and 3D files see our Instructables

Easy Setup 🔧

The Alias software can be flashed onto a micro SD card, for a fast and easy setup. Make sure the respeaker hat is attached to the Raspberry Pi.

  1. Download the alias2_0.img file
  2. Use Etcher to flash a micro SD card with the .img file
  3. Insert the micro SD card into the Raspberry Pi 3A+
  4. Power Alias up and wait for the yellow light to glow

We recommend to use the Easy Setup but if you wish to install the project from scratch use the Manual Install instructions.

Start using Alias 🍄

  1. Configure your Alias by connecting to its local wifi from your phone.
    ssid: Project Alias psw: cordyceps.

  2. Open a browser and enter the url: alias.local to interface with Alias.

  3. From the interface you can now add new wake-up word / commands or edit existing ones. Save any changes by clicking the Update Alias button. We recommend to experiment with different words and sensitivity levels to find what works best for you.

  4. To configure the settings, click the icon in the upper right corner. Here you can adjust and customize the noise, language, gender, volume and delay. Tip: If you write the full command into alias you can create shortcuts and new functions. E.g. By calling 'Funky Time' you could have Alias whisper 'Ok Google, play some funky music on Spotify'.

User interface

Settings ⚙️

Setting Description Default
Noise This will turn on/off the looping noise ON
Gender Choose what gender the assistant should perceive when Alias whispers commands. By changing to the opposite gender you will able to introduce false labelling into the assistants algorithm. This confusion might lead to interesting interactions and answers. Note, this only changes the voice of Alias itself, and will therefore only have an effect with long commands. Male
Language Change the language Alias uses to speak to your assistant. This is to introduce another layer of noise that makes the system label you with a different nationality. To use this feature the command for the assistant has to be written in the same language. English
Volume Change the volume of the speakers. This needs to be loud enough for the noise to block the assistant, but low enough not to be audible. Settings can vary by acoustics and ambient inferences. 39
Noise Delay This increase the delay after the wake-up word has been activated to restart the noise again. This is used as a noise free window, when asking the assistant a question. It should be set to match the appropriate time interval needed for the maximum length of a conversation. 10s
Sensitivity This setting changes the sensitivity of the wake-up word detection. This setting is found on the front page for each command. The lower the number the less sensitive. 20

Manual Install

If you wish to build this project manually, you can follow the guide below. We do recommend using the pre installed image linked in the Easy Setup.

RaspberryPi Setup

How to prepare and setup a Raspberry Pi for this project:

  1. Download the latest version of Raspbian Stretch and flash your micro SD card with Etcher

  2. Copy the ssh and wpa_supplicant.conf files from the setup folder to the SD card (boot)

  3. Edit the wpa_supplicant.conf in a text editor to match your wifi settings. Insert the card to the raspberry pi

  4. In terminal ssh into the pi: sudo ssh [email protected]
    Default password is 'raspberry'. To change password use the 'passwd' command

  5. Update the pi: sudo apt-get update && sudo apt-get upgrade

  6. Reboot sudo reboot

Installing Dependencies

Note: Some dependencies might very for differen versions. This guide has last been tested and validated on Raspbian Stretch version 9.

On the Rapsberry Pi: Enable interface SPI in raspi-config

raspi-config

Make sure you have python3 and git installed for the next steps:

sudo apt-get install python3-dev python3-pip git libatlas-base-dev

Clone and install the sound driver for the ReSpeaker hat:
– This is only required when using the ReSpeaker hat, this code will also work with other sound drivers.

cd && git clone https://github.com/respeaker/seeed-voicecard.git
cd seeed-voicecard && sudo ./install.sh

Disable default sound card by following this guide

Install pocketsphinx and dependencies

sudo pip3 install spidev
sudo apt-get install -y python python-dev python-pip build-essential swig git libpulse-dev
sudo apt-get install libasound2-dev
sudo apt-get install pulseaudio pulseaudio-utils libpulse-dev libpulse-java libpulse0
sudo pip3 install --upgrade pocketsphinx

Install espeak

sudo apt-get install espeak

Install flask server

sudo pip3 install flask flask_socketio

Install pygame

sudo apt-get install python3-pygame

To install a private network you can follow this guide

Finally clone the Alias project:

git clone https://github.com/bjoernkarmann/project_alias.git

Change assistant

If you are using Google Home or an Amazon Alexa the way you change the wake up word is simply by writing it in the responds field in the Alias web-app

Contributors

Made by Bjørn Karmann and Tore Knudsen

License

This project is licensed under the GPL License - see the LICENSE.GPL file in the root folder

project_alias's People

Contributors

0xflotus avatar allanbreyes avatar bjoernkarmann avatar torekndsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project_alias's Issues

Help wanted: I need to count triggering "Keyword"

Hi everyone,
i have a short question:
I would like to count how often Alias is triggering in 24h, without saying my keyword.
I thought about something like this: python3 app.py >> alias.log
and then load the log in text editor and use the search function to list and count the trigger events.
What would be this "text" to search for?

Or is there an other .. smarter possibility to get the trigger count for my settings?
I just want to check my settings..
Thank you very much.

Wake Sequence

Instead of a wake word, a longer wake sequence would be useful (to prevent accidental activation).

Speaker Wiring to JST2.0 Speaker Out on ReSpeaker?

There are a single pair of red and black wires connected to the JST2.0 Speaker Out on the ReSpeaker board and two pairs of red and blue wires connected to the speakers.

Are the red & black wires broken out to a parallel connection to the speakers under the board? (I am assuming that since these are 50 ohm speakers they are wired in parallel and not in series)

speaker_question

Please provide `requirements.txt`

@bjoernkarmann @torekndsn
Please provide your exact local pip dependencies. It looks like many people have a lot of problems with this...

It should be possible to save the dependencies to file with pip freeze > requirements.txt and them install exactly the same packages with pip install -r requirements.txt (even if newer packages have come out in the meantime)

Comment only .. not an issue .. why open source and not patent route?

Hi there, brilliant concept and btw, wonderfully acted, shot and also; love how the video was so succinct, understandable on the ghacks.com website. My extreme question! Why is this open source and why are you not patenting this product/concept? Did you form a company? When did this start? Do users create the retail home listening device's parasitic "white nose cover" out of a raspberry pi kit?? Thank you for your time, I send major kudos .. and p.s. my email is Hostmaster then just an att cymbal then video2video and lastly dod-com .. from Peter in San Diego CA USA. :)

Alias Triggers for any noise

I've completed the build, but at the moment, once trained, the 'Alexa' command is triggered for any noise at all, even if I knock on the table next to it. I'll try a fresh install and post an update, but wondered whether this issue had been experienced before?

Microphone issues

For reasons I don't get, the alias isn't registering any sound. I've used this same hardware (exactly the same, not even a duplicate) before and got it working. I thought that maybe the microphone was registering as from my webcam (which I had initially installed), but even with it connected and the pi rebooted I get nothing.

It's an AIY kit and the Google assistant part works great (so I know the integrated mic does work). I just don't know how to tell alias to listen to THAT mic.

My plan is to kill the interference sound (file with silence?!) and instead of playing the "ok google" file, have it either use a relay to short the two wires that connected to the original button OR there's talk that I could send a signal to those pins internally and use the relay for other stuff.

Any ideas on those fronts, too?

[Idea] Add some sort of voice manipulation to prevent analysis

Similar to #8, just with some constant sound playing while the device is listening, so it can still understand what you say, but without being able to detect mood, etc.
This would be easier to implement, because Alias only has to change the soundfile and volume level instead of analyzing your words and "text to speech" them.
I consider creating a pull request about this, but wanted to get your thoughts about that approach.

can't install Keras

Hello, i can't install keras.

if i want to install keras, after a long time nothing happens and its freezes.

Does somebody has any idea?

pi@raspberrypi:~ $ pip3 install --no-cache-dir keras Collecting keras Downloading https://files.pythonhosted.org/packages/5e/10/aa32dad071ce52b5502266b5c659451cfd6ffcbf14e6c8c4f16c0ff5aaab/Keras-2.2.4-py2.py3-none-any.whl (312kB) 100% |████████████████████████████████| 317kB 4.0MB/s Collecting keras-preprocessing>=1.0.5 (from keras) Downloading https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41kB) 100% |████████████████████████████████| 51kB 4.7MB/s Collecting scipy>=0.14 (from keras) Downloading https://files.pythonhosted.org/packages/cb/97/361c8c6ceb3eb765371a702ea873ff2fe112fa40073e7d2b8199db8eb56e/scipy-1.3.0.tar.gz (23.6MB) 100% |████████████████████████████████| 23.6MB 3.9MB/s Collecting h5py (from keras) Downloading https://www.piwheels.org/simple/h5py/h5py-2.9.0-cp35-cp35m-linux_armv7l.whl (3.5MB) 100% |████████████████████████████████| 3.5MB 7.0MB/s Collecting six>=1.9.0 (from keras) Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Collecting keras-applications>=1.0.6 (from keras) Downloading https://files.pythonhosted.org/packages/71/e3/19762fdfc62877ae9102edf6342d71b28fbfd9dea3d2f96a882ce099b03f/Keras_Applications-1.0.8-py3-none-any.whl (50kB) 100% |████████████████████████████████| 51kB 7.0MB/s Collecting pyyaml (from keras) Downloading https://files.pythonhosted.org/packages/a3/65/837fefac7475963d1eccf4aa684c23b95aa6c1d033a2c5965ccb11e22623/PyYAML-5.1.1.tar.gz (274kB) 100% |████████████████████████████████| 276kB 4.6MB/s Collecting numpy>=1.9.1 (from keras) Downloading https://files.pythonhosted.org/packages/d3/4b/f9f4b96c0b1ba43d28a5bdc4b64f0b9d3fbcf31313a51bc766942866a7c7/numpy-1.16.4.zip (5.1MB) 100% |████████████████████████████████| 5.1MB 6.3MB/s Installing collected packages: six, numpy, keras-preprocessing, scipy, h5py, keras-applications, pyyaml, keras Running setup.py install for numpy ... done Running setup.py install for scipy ... \packet_write_wait: Connection to 2002:5b43:6398::c87d:5754:ffa2:5f3 port 22: Broken pipe

printing settings for shell

Hi Bjoern: I may be asking this question in the wrong place, but could you please provide some guidance on printer settings for the shell? Your instructable suggests printing upside down, but I'm having a hard time finding a position that has enough points of contact to adhere to the print bed for the entire print, particularly with all the pressure put on the edges as it prints higher layers, I note in the picutre you are using a pretty wide brim, and I've tried increasing mine to 15, with three smallish contact points, but that has not been enough for me to get a successful print. Any guidance you can offer would be appreciated.
Thanks, and thanks for the cool project!

Installation failed

I try to execute the readme.
It failed.
I try to follow Issues 32 and still doesn't work.

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-7yz1q1em/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-v3js5trq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-7yz1q1em/scipy/

This project is dead ?

Update install instruction suggestions

When following the manual install guide i had to install the following additional dependencies manually:

sudo apt-get install pulseaudio swig libpulse-dev libasound2-dev
sudo pip3 install pocketsphinx spidev

After, it all works great on Raspberry Pi Zero W!

Copy the ssh and wpa_supplicant.conf files

Hello everyone,

i am quiete new in the raspberry world (only successfull experience with the Pi hole Project)

I stuck at the Point "2. Copy the ssh and wpa_supplicant.conf files from the setup folder to the SD card (boot)"
I copy it as root to the /boot folder but after reboot both files are gone.
other folders like documents are o.k. after copieing, the poroblem is only in boot folder
I tried two sd cards and also copy from usb stick to the card.
Nothinmg works and i cant find a solution in the web.

Thanks for helping.

Kindest Regards Andreas

the speakers do not give sound.

Hello,

I just installed version 2.0 manually but I don't have the noise. In summary the speakers do not give sound.
Can you help me

compile:
pi@raspberrypi:~/project_alias $ python3 app.py
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
starting socket thread

============================================
SERVER RUNNING ON: http://0.0.0.0:5050

play noise

  • Serving Flask app "modules.connect" (lazy loading)
  • Environment: production
    WARNING: Do not use the development server in a production environment.
    Use a production WSGI server instead.
  • Debug mode: off
    amixer: Unable to find simple control 'Headphone',0

amixer: Unable to find simple control 'Speaker',0

init live speech
running speech

Any modifications required for the Google Home Mini?

I and several coworkers are interested in building these for our personal use. Has anyone tried it with a Google Home Mini as that seems to be the smart speaker of choice in our group? Are the microphones of the mini spaced similarly to the Google Home?

White noise and building docs

Very interesting project! I have 2 questions, not so much an issue:

  1. Does the speaker make a white noise sound, or is it otherwise inaudible?
  2. Do you have plans for instructions on how to put the parts together?

tf.AUTO_REUSE is deprecated.

Hello, I tried to get my Alias running but when I run the code I'm getting several errors. Does anyone know what to do?

Python 3.7.3 (/usr/bin/python3)

%cd /home/pi/seeed-voicecard/project_alias
%Run app.py
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
23.0
Using TensorFlow backend.
WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py:98: The name tf.AUTO_REUSE is deprecated. Please use tf.compat.v1.AUTO_REUSE instead.

WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py:98: The name tf.AttrValue is deprecated. Please use tf.compat.v1.AttrValue instead.

WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py:98: The name tf.COMPILER_VERSION is deprecated. Please use tf.version.COMPILER_VERSION instead.

WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py:98: The name tf.CXX11_ABI_FLAG is deprecated. Please use tf.sysconfig.CXX11_ABI_FLAG instead.

WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow/init.py:98: The name tf.ConditionalAccumulator is deprecated. Please use tf.compat.v1.ConditionalAccumulator instead.

Simple mixer control 'Speaker',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 83 [65%] [-38.00dB]
Front Right: Playback 83 [65%] [-38.00dB]
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 934
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1043:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:575:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:1043:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:575:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Thanks

Question only

Sorry, but is possible soldering cable directly? Speaker (RPI) to Mic (GH)?

Model not saved or not activated

Sorry to be such a pain.

When I exit out of app.py (it's not automatically starting for me, but that's a different issue, one that I think I can figure out), all is well, until I restart app.py and then it acts as though it's never been trained. I've tried starting over, having erased the training and that doesn't work.

Any ideas?

Works just when Noise is disabled

Hello Everyone,

Thanks for this nice Project!

Just one Problem:

my Echo Dot triggers just when is manually disabled the Noise sound in the Menu..
(i can hear the "ALEXA" from the small speakers...)

When the Noise sound is active i can also hear the "Alexa" but nothing happens on the Echo Dot...

any recommendations?

thanks Flo

Stopped responding

Bought all the recommended parts, did the easy install, worked initially for a few hours. First, the shortcut commands degraded and stopped at "Ok, Google." Now no shortcuts or wake words work, tried many variations. The speakers still produce sound, and that is responsive to the volume slider. Tried to ssh into [email protected] and it required a password I haven't located in the docs.

Installation issues

When I run "sudo pip3 install tensorflow keras" I have trouble with Scipy. Here's the message I get
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-gisif9_e/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-w_ck2k79-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-gisif9_e/scipy/

So, when I try to run app.py, it doesn't work...at all. This is the message I get when I try to run it manually: File "app.py", line 8, in <module> from modules import connection File "/home/pi/project_alias/modules/connection.py", line 7, in <module> from modules import sound File "/home/pi/project_alias/modules/sound.py", line 5, in <module> from python_speech_features import mfcc File "/usr/local/lib/python3.5/dist-packages/python_speech_features/__init__.py", line 1, in <module> from .base import * File "/usr/local/lib/python3.5/dist-packages/python_speech_features/base.py", line 6, in <module> from scipy.fftpack import dct ImportError: No module named 'scipy'

It loads on another SD card that I loaded it on earlier, but I've tried two versions of the OS (the one from AIY, from Google, and a regular, and Raspbian stretch full from April 2019.)

My only two thoughts are either that the newest version of Raspbian don't like it or that something is going on with the source files. It is a Class4 16 gb card vs. a Class 10 32 gb, but I don't think that's it.

Any ideas?

error minor in ai.py

Hello

There is a minor error in:
project_alias / modules / ai.py ", line 112
model.save ("data / previous_model.h5)
rather
model.save ("data / previous_model.h5")

Version 2.0

Hi,

Is there already information, when the new version goes online?

Greetings
Phil

TensorFlow - Assertion `ret == self->nfds' failed

Had to install TensorFlow with the flag "--no-cache-dir", not sure if this is why things are not working out. Here is the problem:
Upon starting "app.py", the following warning appears and the processs is aborted.
Unsure how to proceed next.

`WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/keras/backend/tensorflow_backend.py:4267: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/keras/optimizers.py:793: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow_core/python/ops/nn_impl.py:182: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
python3: src/hostapi/alsa/pa_linux_alsa.c:3641: PaAlsaStreamComponent_BeginPolling: Assertion ret == self->nfds' failed. Aborted

Bugs with wake-word text entry from mobile

When I use the UI in the web-app from my phone (Android, Pixel 2, Chrome browser) and try to type a keyword I have the following 2 issues:

  1. When the keyboard opens, the text input moves up beyond the viewport so it's not visible.
  2. If I try to type a multi-word wake-word (e.g. Hey Jarvis), it will reverse the order (e.g. Jarvis Hey). I assume the cursor is moving to the beginning of the input when I press space for some reason, but because of issue #1 it's hard to tell.

Memory consumption of app.py

I am using: Linux 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux (Buster)
Python version: 3.7.3 on a Rapberry Pi 3 model A+ The system is close to a default Buster install with only a few extra's.
Everything is working without errors, except that app.py is consuming 300-500 kBytes more every minute. Is starts with approx. 38 MB en run until approx. 75-80 MB and then sometimes the system crashes and sometimes only the app.py crashes.
Anyone any idea how to prevent this?

ALSA Problem

After successfully installing all the packages as per the instruction, running "app.py" leads to the following error
pi@raspberrypi:~/project_alias $ sudo python3 app.py pygame 1.9.4.post1 Hello from the pygame community. https://www.pygame.org/contribute.html ALSA lib pcm_direct.c:1824:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card Traceback (most recent call last): File "app.py", line 8, in <module> from modules import connection File "/home/pi/project_alias/modules/connection.py", line 7, in <module> from modules import sound File "/home/pi/project_alias/modules/sound.py", line 14, in <module> pygame.mixer.init() pygame.error: No available audio device

Not sure how to tackle the problem. Alsa is configured to select the peripheral "PCM". The HDMI cable is also not connected.

what is the ssh passwd for alias2_0.img?

Hi, first of all, great to see there is a new Alias version! thanks!

I want to debug the app, I have installed the img file, what is the ssh user and password?

Thanks in advance,

Offer.

Apologies if this isn't allowed. I'm new. I wanted to declare that I would pay someone to put this together for me. I don't have the technical know-how to do it, or the resources to try.

Are there anybody that got the new final 2.0 image to work?

Hi all, really sad there is no support from the dev's after releasing the 2.0.

I've got the exact same hw parts as they have used. Flashed the ready-made image. Got no noise/sound. There is absolutely no debugging or behavior info available.

Perhaps others here could assist each other?

Hardware compatibility

This project only works with the hardware that is in the description?
Can it work with another speaker and microphone? I had an error when testing them.
Thank you

ssh password not working

when i write "sudo ssh [email protected]" and i press enter, when asks for the password i try with "raspberry" but it dosent work

EDIT: the password is the password of my raspberry, im stupid LOL

Tensorflow package

Hey there,

I have a issue installing tensorflow package, I always get this error "error command arm-linux-gnueabihf-gcc failed with exit status 1"

Any idea how to fix this?

feedback Project Alias 2.0

Hi,
I've tested the Project Alias 2.0 yesterday.
If you want to connect using the url alias.local you need to have Bonjour...it"s not my case, so use IP address instead : 192.168.4.1
So, I configure Alias, set a new name, male voice, french, and test.... nothing append.
Google still working (I try changing volume, and check Noise enable) .. :(
And sometimes, I can ear my voice in speakers.

What's wrong with my Alias?

Memory Error when trying to install tensorflow

For reference in case others experience the same issue I did when trying to install on a 2018-11-13-raspbian-stretch-full.img version of Raspian.

When trying to install tensorflow via command: sudo pip3 install tensorflow keras, I received the following memory error.

tensorflowerror

However, when I changed the command to the following it resolved the issue.
pip3 install --no-cache-dir tensorflow

Proposal

Hi, fantastic project.

I have an idea to add to this project. That is adding a robotic voice (such as a "text to speech" free software) between the users and the he alexa/siri/whatever device. The aim is removing sensible data about the gender, sex or even the number of different persons than uses the device (where you can deduce the number of people that live in the house where the device is installed)

Training alias not possible

Hi,

I have a problem calling the page "raspberrypi.local: 5050".

The site is not accessible.
I have everything installed and configured according to the instructions.
But its not work.

if I enter the command "cd project_alias && python3 app.py &" over ssh and putty the message comes the follow:

pi@raspberrypi:~ $ cd project_alias && python3 app.py &
[1] 1201
pi@raspberrypi:~ $ pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
23.0
Using TensorFlow backend.
Traceback (most recent call last):
File "app.py", line 10, in
from modules import ai
File "/home/pi/project_alias/modules/ai.py", line 6, in
import keras
File "/usr/local/lib/python3.7/dist-packages/keras/init.py", line 3, in
from . import utils
File "/usr/local/lib/python3.7/dist-packages/keras/utils/init.py", line 6, in
from . import conv_utils
File "/usr/local/lib/python3.7/dist-packages/keras/utils/conv_utils.py", line 9, in
from .. import backend as K
File "/usr/local/lib/python3.7/dist-packages/keras/backend/init.py", line 1, in
from .load_backend import epsilon
File "/usr/local/lib/python3.7/dist-packages/keras/backend/load_backend.py", l ine 90, in
from .tensorflow_backend import *
File "/usr/local/lib/python3.7/dist-packages/keras/backend/tensorflow_backend. py", line 5, in
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

can someone help me with this?

Thank you

greetings Phil

Pi4 compatibility issue

Good day and thank you for creating this project!

I've noticed that the "Easy Setup" doesn't work on a Pi4 (only get red light, doesn't seem to boot) but the manual setup goes okay until it comes time to train Alias. I can't seem to detect the WiFi network on any computer or phone. Do you know if this issue is specific to the Pi4, or am I missing something else?

Readback is not correct

Good morning,

I installed 2.0 yesterday but my readback is not correct. I use "Alias" to wake Alias up, when I speak the command "Alias wie viel Uhr ist es?" The noice is canceled and I can hear the readback "ok google" and my gogle home wakes up. Unfortunately the rest is not send to my google home. Am I doing something wrong?

Florian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.