stevenhickson / piauisuite Goto Github PK
View Code? Open in Web Editor NEWRaspberry PI AUI Suite
License: Other
Raspberry PI AUI Suite
License: Other
It looks like (at least for me) keyword recognition in voicecommand does not work with a mono microphone. I can change the channels in speech-recog to process mono and that works correctly but keyword verification still tries to capture in stereo.
you can either use
sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
to update or skip the middleman all together and install using that script. The old youtube-dl breaks itself trying to overwrite itself with a bad url.
Updated script curtsy of https://github.com/rg3/youtube-dl
In a fresh install (just voicecommand) after one to three maximum successful commands I get a segmentation fault.
How can I find out what's causing it and/or fix it?
pi@camPI ~ $ voicecommand -c
Opening config file...
running in continuous mode
verifying command as well
keyword duration is 2 and duration is 3
Found audio
error in original mmap
Aufnahme: WAVE 'stdin' : Signed 16 bit Little Endian, Rate: 16000 Hz, stereo
command: tts "Zu Befehl!" && bash /home/pi/ledstrip/./power
Segmentation fault
Segmentation fault
If I use latest git sources, commands like:
name $name==echo $name
Do not work. It does not recognize the command although it detects the string:
name Martin
Shouldn't it write "Martin" onto the screen?
Hello,
i have a Problem with the Audio Output of PiAUISuite, because there is no Audio Output. My Speakers are working good, i can Play Audio, but with PiAUISuite there is nothing. For Example by running the Setup, i couldn´t hear anything.
By Starting PiAUISuite everything was ok, but after some minutes the Audio Output was dead.
Do you have any Idea about it?
Hello if possible, could you add support for playing tracks from Soundcloud?
I'm not sure if this is a recent change, as I was using VoiceCommand just fine a couple of weeks ago, but today I noticed that the executable wasn't working. After some digging it appears that Google is responding with:
POST requests require a Content-length header. That’s all we know.
Looking further into this, it appears that maybe this service is no longer something you can call without an API key. After resolving the Content-Length, the next error is for:
Missing parameter: key
So, if I change the language to german and change the response to "Ja Bitte?", voicecommand still uses "Yes sir?".
I get this error whenever I try to run voicecommand -s, or just try to install the voicecommand module from the main install. I tried this on my laptop running Crunchbang Waldorf, as well as another laptop running Kubuntu, and I get the same error.
This seems like a bug, but it doesn't seem as though anyone else is having this issue. I don't think it can be fixed, but if it can, I would like to know.
It's possible to change the default american female voice when using TTS by using google.co.uk instead of google.com. You should consider adding a flag that would allow users to do that - I personally prefer the british voice and just changed the script manually.
Hey Steve, it seems like you've got a great plugin, but I can't seem to get it working. I'm using a Pi 2. is it not compatible with that model? Also, the usb headset I'm using records and plays back audio just fine. Whenever I run voicecommand, it returns with "No translation" and no audio response.
Thanks for your help.
Hello,
This is not an issue, but rather a post on how this idea could jump on to the next level.
There exist many projects which actually cover speech recognition and a provide a "Jarvis" feel, and a couple of them are actually written especially for the raspberry pi, like this one.
I heard about this project about a year ago and was totally fascinated, but realized quickly, that not all of my needs could get covered.
I started my own project (half way), which is nothing else that a clone of voicecommand written on perl (https://github.com/computaholic/pivoice). However, I am not an expert in all this and sometimes it worked and sometimes it didnt. But I implemented some cool features, which I will summarize a little below.
Another great Project is Jasper (http://jasperproject.github.io/), which again is actually the same, but does not depend on google (which is good and/or not so good).
So my Idea is, why not combining the best from all projects and create something that is superiour to all that has come to glance so far? I'd rather have one good solution than 10 proof of concepts ones.
My project is called pivoice and is heavily inspired by this project. However, I tried to do things a little different:
[playmusic]
ListenFor = play music
Action = echo ""
[playssong]
ListenFor =~ play $song from @band
Action = echo "vlc /path/to/music/@band/$song.mp3"
[playvideo]
ListenFor = ^play\b(.?)\bseason (.?) episode (.*?)
# default: simple
MatchStyle = regex
Action = echo "mplayer /videos/$1/season_$2/episode_$3"
Basically, this uses a local speech recognition. You have to define every word, that needs to be recognized. This is fast, but does not allow any words, that are not in the dictionary. Its ultra fast and very accurate (if the ditcionary is well written). I first thought of writing a google speech plugin for this, but then I thought why not tryning to combine the best of all worlds.
So, what do you think. Is there any interest in bringing these together? I guess this mostly goes to Steven.
computaholic
Could you run a local remote control on the Pi for a Raspbian build with XBMC installed (Stock, RaspBMC, OpenElec, xBian, etc) that also responds to Voice Commands, so we can have a complete Xbox navigation experience?
During the installation process, exactly when asking "Do you want to set up and check the speech recognition options?" I get the error message "I couldn't find a hardware device. You don't have a valid microphone" and the installer closes. I have an USB sound card plugged in (for headphone and microphone), and the hardware seems to work correctly. card number is 0.
List Devices:
Command: aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Device [USB PnP Sound Device], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 1: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Command: arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 0: Device [USB PnP Sound Device], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Take a record:
Command: arecord -D plughw:0,0 -f cd test.wav
Works perfectly.
Play the recorded wav-file:
Command: aplay test.wav
Works also.
Config Files:
/etc/modprobe.d/alsa-base.conf
I edited it to
options snd-usb-audio index=0
/etc/asound.conf
I added this:
pcm.!default {
type plug
slave {
pcm "hw:0,0"
}
}
ctl.!default {
type hw
card 0
}
So I think that my audio input and output configured correctly...What else can be the mistake?
Thanks for your help!
Is there any possible for using a bluetooth headset/microfoon. So i can use it in my entire house ?
thanks in advance.
The current repository contains a lot of stuff that is usually not meant to be version controled. A .gitignore file might help with that.
Hi Steven,
I don´t get the right command to switch my Lights On and Off. I use an Arduino and homecontrol4me to switch my RC Switches. I can do this by open this Link for example in my browser: http://192.168.1.66/rawCmd?ein&1 -> Turns Light 1 On.
How can I teach voice command to do this? Thought something like this:
Light Sofa On==midori -a http://192.168.1.66/rawCmd?ein&1
but it doesn´t work. Can anyone help me out here?
Hi Steven,
did you make any progress in using a different languge than english? As Voicecommand is using Wolfram Alpha to answer to questions, couldn´t you just let google translate the question to english, send it to Wolfram and translate the answer back to the users language?
Also I found out, that if I enter the question "what ime is it?" directly to wolfram alpha on their website, but in german "wie spät ist es?", wolfram automatically finds the closest answer by giving me the correct time. For any reason this does not work with Voicecommand, it would answer "Could not find answer. Try again.".
I´m sorry I bother you with that, but it´s really sad to me that I can´t even use voicecommand to tell me the correct time in german. I also tried to use google for giving me the correct time, but then VC just wants to open midori...
Thanks for you help!
./tts -l fr "connecté"
Instead of "connecté" you hear connectCOPYRIGHT
In Line 39/35
https://github.com/StevenHickson/PiAUISuite/blob/master/VoiceCommand/tts#L39
Add ie=UTF-8
wget -q -U Mozilla -O "/dev/shm/tmp.mp3" "http://translate.google.com/translate_tts?ie=UTF-8tl=${lang}&q=$tmp"
Hi,
I have installed the PiAUISuite and it didn't work. When I run 'voice command' it says the following:
Opening config file…
You have a formatting error on line 35 of your config file. I'm ignoring that line.
You have a formatting error on line 42 of your config file. I'm ignoring that line.
You have a formatting error on line 46 of your config file. I'm ignoring that line.
Not querying for answers
running in continuous mode
verifying command as well
keyword duration is 3 and duration is 3
Which config file are we talking about here? There is this /home/pi/PiAUISuite/VoiceCommand/commands.conf. But obviously this doesn't have line 35, 42 and 46.
It doesn't react to anything, though the volume should be good…
EDIT
The errors where empty lines found in the config file $voicecommand -e
Deleted the empty lines and cleaned up the copies of the commands.
Hi,
Not sure if this the right place to ask.
When trying configure voice command it says:
"voicecommand: error while loading shared libraries: libboost_regex.so.1.49.0: cannot open shared object file: No such file or directory"
Trying to install this package gives me the following : Couldn't find any package by regex 'libboost-regex1.49.0'
This issue has been posted on various sites by different users, but no one has posted a solution or if it is impossible to do so.
-John
I just emailed Steven without considering the idea of a ticket, so I figure Ill mention it here also.
When I use my webcam for a microphone on my RasPi, I need to specify the second sound card option, 2,0. According to man voicecommand, you offer -D to do so, but I can seem to get it to work.
When I do 'voicecommand -D 2,0' it says "Attempting to answer: 2,0". Similar result with 'voicecommand -D plughw:2,0'. I cant figure out how to properly define it.
Could you let me know what I am missing?
The suite could allow a list of different responses to be randomly played after the keyword.
InstallAUISuite.sh =>
Would you like voicecommand to try to set itself up? y/n
y
./InstallAUISuite.sh: line 186: 1244 Illegal instruction voicecommand -s
Google didn't help so I thought I'd ask here. Tried to install it on my old raspi B+ running osmc.
Hi Steven ,
I have a little bit the same problem like highlite86.
I have pluged in a soundcard too and it still not working.
aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 0: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: Set [C-Media USB Headphone Set], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 1: Set [C-Media USB Headphone Set], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Take and play a record works fine.
I don't edit my config files to 0 because the card is card 1
/etc/modprobe.d/alsa-base.conf
Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=1
/etc/asound.conf
cm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
voicommand -e
But it's still not working when i want to test the speech recognition.
I hope you can help me.
play music by $1 please==cvlc -I ncurses /mnt/Music/$1//./.mp3
Input: play music by Artist please
returns
Command: cvlc -I ncurses /mnt/Music/ARTIST//./.mp3
which doesnt conform to case-sensitive file systems, maybe theres a reason for that?
Thanks!
Does this support google's 2 step verification? I cannot seem to get gtextcommand to login properly.
Would be nice to allow improper and response to run custom commands instead of just saying words. Useful to some power users.
Just a small issue, it would be nice to make the sampling rate, -r parameter of arecord external to your voicecommand binary.
I had issues with the default "-r 16000" with my Philips Toucam 740K which only support: mono, 16 bit, 8 / 11.025 / 22.05 / 44.1 kHz
So changing everything to 44100 and recompiling did the trick.
Otherwise cool plugin! And thanks for sharing.
ut.
... downconn.cpp:(.text+0x156): undefined reference to curl_easy_cleanup' downconn.cpp:(.text+0xa79): undefined reference to
curl_easy_setopt' ..
Solution is to change Makefile
->
Dear Githubian,
My PiAUISuite installation will always end up with no audio output. It works fine for aplay but not for voicecommand.
Mind helping me out?
Hi Steven, awesome project you got there and i am eager to try it !
I did every step for the install, and i got this error while doing the auto-config with voicecommand -s when it need to set up and check the speech recognition options :
[code]I got ????, which was different than what you typed : pi [/code](the ???? are actuals littles signs on the shell, dunno if they are not some 7777)
Any idea what i could do to fix it ?
Cheers
I have installed a program that pulls up songza via cli. The command looks like
rick~$gl <genre/activity/mood> <specific genre/activity/mode>
So in my commands.conf I input...
songza $1 $2==gl $1 "$2" <---parantheses in case the specific genre/activity/mood is more than one word.
If I try the voice input of
songza genre metal
The screen readout shows..
songza GENRE "M"
It always returns a single letter for the variable. I cant figure out what is going on. Little help?
Thanks!
When I post to fb or twitter, or send a text, there's always the double quotes. Can we use a python script to get those removed?
The suite could allow a user command to be run soon after the keyword recognition, like litting up a led or something. Another command could be fired after the command recognition and so on.
This would fit applications with no speakers, but instrad visual indication like LEDs.
There is a substantial delay (about 5 seconds) between the pi saying "Yes Sir" and actually recording audio for the next command. Is this something that can be modified in the code/settings or is it being caused by hardware? If it's a hardware issue is there a likely culprit? I'm using a logitech C310 for recording audio. It is able to recognize and verify the keyword promptly, even if it takes time to record command input.
I'm an idiot. I didn't use sudo. Ignore this.
Hi, there is a weird problem with voicecommand.
voicecommand -f /root/.commands.conf -r "Hello" -c -b0 -i -t 5
Sometimes, the server speaks the response ("Hello" in my case) while the microphone is turned off, and then the words of improper command. It seems the threshold of sound is met which triggers the response. But how could it happen while the microphone is turned off?
Need to update speech-recog.sh to Google's new v2 version.
Perhaps I should also move to the full duplex version as well.
Hi,
I don't get voicecommand to talk to me. aplay and mpg123 work just fine, arecord, too. !hardware==plughw:0,0
Sometimes I get output like this:
Opening config file...
running in continuous mode
verifying command as well
keyword duration is 2 and duration is 3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36597 0 14 100 36583 9 25085 0:00:01 0:00:01 --:--:-- 25091
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38689 0 14 100 38675 7 19478 0:00:01 0:00:01 --:--:-- 19483
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40122 0 234 100 39888 81 13942 0:00:02 0:00:02 --:--:-- 13941
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38668 0 185 100 38483 92 19318 0:00:01 0:00:01 --:--:-- 19318
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38144 0 14 100 38130 9 25881 0:00:01 0:00:01 --:--:-- 25903
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36882 0 14 100 36868 9 25318 0:00:01 0:00:01 --:--:-- 25338
But nothing else happens. I don't hear anything during the setup.
Any guesses?
How usable / functional is this library? Is it feature complete? It looks to be in active development, I have my fingers crossed that this can be used to write bindings for higher level languages.
Hello Steve,
It took 3 days to figure out tts script is not working.
Seems like google has blocked that service when its used by automated scripts.
https://support.google.com/websearch/answer/86640
Can you please update like Jasper?
Thanks.
Raqueeb Hassan
Bangladesh
This is a really cool project, but it would be really nice to remove all the xorg* dependencies during setup.
If you want to automate things on a headless server this would save some time during installation.
A little background; My guess is that VoiceCommand (VC) works by recording X duration seconds, sends it to Google API, gets Google's response, and then parses it to see if your keyword is present. So, in my situation, my Rasp Pi records 2 seconds, uploads it up to google, reads what Google returns, and then compare with my keyword. If I say "Computer" (my keyword) it gets recorded, sent up to google and the result is parsed by VC.
One annoying thing I have discovered is that I must say "Computer" during those two seconds; and only during two seconds. If you speak the keyword during the upload period, while waiting for google period, or the parsing time frame, you are out of luck.
I've found a way using my Raspberry Pi 3 (Raspbian Jessie) to take control of the green LED (ACT) and turn on when recording, turn off when doing other processes.
What I need is a few brave testers to try this feature out. One thing; I do not have any other versions of Raspberry Pi - just the Rasp Pi 3 (and running on raspbian jessie) Who wants to be a QA tester?
First, lets see if you are able to control the ACT led light (Instructions for RaspPi 3, your results may vary).
STAGE 1 - Can you access the LED from the OS
Step 1. cd /sys/class/leds
and see if there's a directory called led0 (may be led1 for some)
Step 2. run echo gpio | sudo tee /sys/class/leds/led0/trigger
You now have control of the LED light. (I assume its led0, may be different)
Step 3. turn on the LED with echo 1 | sudo tee /sys/class/leds/led0/brightness
Light should turn on.
Step 4. turn off the LED with echo 0 | sudo tee /sys/class/leds/led0/brightness
Light should turn off.
When trying to access the yt://youtube.com/watch?...
urls in Midori, a black window is opened, but it closes immediately.
So, here are some ideas I had which may be worth lokking at. I decided to open ONE issue for this, but if the developer thinks any of this should be handles in a seperate issue, then just mark that in the comments. Please dont consider this to be spam.
Idea 1: Using Regular Expressions for commands
I really like the idea of the ~ to be more flexible in the command. Maybe someone would like to be even more creative. Therefore I suggest to allow regular expressions as commands. E.g. define something like "_music_on==mpd start" to catch "Turn the music that I like so much on" (that might not be correct english here...), but I hope the Idea is clear. This can also be used to find the "nearest" command, e.g. you have defined a comman "futurama==..." but sometimes the command is evaluated to "future mama", then a regex can be found to match both.
Idea 2: Allowing mulltiple definitions for one command
E.g. "music on|play|radio on==mpd start". This could also be useful for the other side. One could define multiple responses, that are put out randomly, e.g. !response==Yes sir?|Whats up?|What can I do for you?.
Idea 3: Acknowledge Signal
Something like !acknowlegde=Got that! to know that the command is understood.
Idea 4: Repeat Command
Lets say I said "music on", but it was not recognised, then there should be an option to allow voicecommand to ask me to repeat that command, so I dont have to say the keyword again. This should be limited to a certain number.
Idea 5: Allowing more config files
I think its always a good idea to seperate the general config for the program (voicecomman) and the user specific commands. How about having the ability to include config file within another file? Or, even better I think, using a config.d structure, meaning that all files under .config.d/* are used as config file. This would also allow to have different files for different situations. E.g.,
.config.d/conf % Here are all special !... commands
.config.d/music % all music related commands
.config.d/email % all email related commands
In future, it might be usefull to load or unload different scenarios dynamically.
Im looking at installing this on my raspberry pi 2 to do some home automation voice control but looking at some of the issues it looks like google tts doesnt work anymore and this has been fixed using pico2wave.
Im unsure how to compile the code etc etc to get this latest version to run.
Could someone supply a sd img file from a current working setup they have?
Thanks.
I am currently trying to get voicecommand working, I've been at it for about a week. I have been trying to use jasper also without any luck. I've followed all the step by step guides, all the troubleshooting guides and I have searched the internet trying to find out what the issue is. I have changed the alsa-mixer settings also. I can hear and record things using arecord and aplay commands but I cannot get any sound from the piauisuite voicecommand program it's self, bothing during install when it checks the settings and when I run the actual program. Any help would be greatly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.