Domoticz voice recognition with Jasper

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz voice recognition with Jasper

Post by nlooije »

Ever wanted to control your Domoticz projects like Tony Stark and Jarvis? Well now it is possible...
I spend some time writing a Jasper module which communicates with a Domoticz server through the JSON API.
The module can be found here. I'd appreciate if anyone using Domoticz and Jasper can test the module and suggest improvements if necessary.
I have not tested the module exhaustively (unittest are a to-do) so without a doubt there will be some bugs needing fixing.
I welcome any contributions, so send in a PR if you have any.

If there are questions concerning the Domoticz part of the Jasper module I welcome them here; this can be discussion on functionality for the module or bugs specific to the module, configuration of the module, etc.
If there are questions concerning Jasper installation and configuration then please post them to the Jasper support forums. This keeps the discussion here relevant to Domoticz.
Last edited by nlooije on Wednesday 02 March 2016 17:23, edited 2 times in total.
m0rph13
Posts: 18
Joined: Sunday 31 January 2016 1:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: Domoticz voice recognition with Jasper

Post by m0rph13 »

Interesting! How does Jasper compare to Siri ?
I'm currently happy with Siri and Homebridge (using the eDomoticz plugin), but could be fun to try something new :)
pazzje
Posts: 11
Joined: Thursday 12 March 2015 17:53
Target OS: Windows
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by pazzje »

I will take a look
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

m0rph13 wrote:Interesting! How does Jasper compare to Siri ?
I'm currently happy with Siri and Homebridge (using the eDomoticz plugin), but could be fun to try something new :)
Well Jasper in essence is a backend for transcribing speech using a STT engine, evaulating the spoken text to perform a command and then respond using a TTS engine. The STT and TTS engines are free to choose, i use the Google engines for example. I have no idea how it compares to Siri, perhaps you can make this evaluation and post your results here?
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

Where can i find the google voice api?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Derik wrote:Where can i find the google voice api?
Are you following these configuration steps? Make sure to install all dependencies for Google STT and Google TTS. Google STT requires an API key:
To obtain an API key, join the Chromium Dev group and create a project through the Google Developers console.

Then select your project. In the sidebar, navigate to “APIs & Auth.” and activate the Speech API. Under “APIs & Auth,” navigate to “Credentials.” Create a new key for public API access.
Add the appropriate settings in ~/.jasper/profile.yml
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

i did join the group...
only no key..
just a lot of mail from the forum.. [ can i turn that off? ]

What do i need to create?
or is this just to get the api key?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Derik wrote:i did join the group...
only no key..
just a lot of mail from the forum.. [ can i turn that off? ]

What do i need to create?
or is this just to get the api key?
This is just to get the api key. If you joined the Devgroup you shoud be able to find the Speech API, enable it and then under credentials create an API key.
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

almost i think..
Hard to get, for a dombo...
ScreenShot035.jpg
ScreenShot035.jpg (52.05 KiB) Viewed 4816 times
I can choose a lot..:
ScreenShot036.jpg
ScreenShot036.jpg (96.31 KiB) Viewed 4816 times
only not the one you says...

Found one only what sould i do now:
ScreenShot037.jpg
ScreenShot037.jpg (84.54 KiB) Viewed 4816 times
so what is my next step....
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Are you absolutely sure you are part of the devgroup? follow this just to be sure...
make sure also that the account you used to sign up for the devgroup is the same account for the dev console.
if all works you should be able to enable the speech api and create the api key.
If it still doesn't work, consider installing another STT engine
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

I think i got something:
ScreenShot039.jpg
ScreenShot039.jpg (44.66 KiB) Viewed 4813 times
And this is it gues?
ScreenShot040.jpg
ScreenShot040.jpg (43.89 KiB) Viewed 4813 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Yeah so Server key 1 is the Speech API key, enter that into profile.yml
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

nlooije wrote:Yeah so Server key 1 is the Speech API key, enter that into profile.yml
Pff
Thanks....

Go now to visit friends of my boss.... :-( when i have time [ not match ] i give it a try
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz voice recognition with Jasper

Post by Thomasdc »

Hi nlooije !

I will give this a try as soon as possible! and i am happy to help where possible (testing/looking for bugs)

What hardware do you use? (microphone)

and how is your experience so far?
not to much 'false positives' while watching a movie or something?

I will also give my experience on this, but I will only be able to test it out in a few weeks.


Thanks anyway!!
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Hi Thomasdc,

I look forward to your account of your experience with the module.
I use a 20 euro Akiro mini usb from amazon; i like that it is small and easily concealed, its accurate within a meter or so but i can't use it from across the room (yet). On the Jasper forum we started a 'supported hardware list' thread you may want to check (although it's not very extensive yet).

In general i think the module work quite well, with little false positives within my use cases but it is best to provide as much detail as possible when giving commands. With this i mean that specifying the 'command', 'device' and 'room' works better than just 'command' and 'device'. This may be improved if Jasper moves to a better way of predicting user 'intent'.

good luck
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

Holiday so i give it a try.. :-)

1 problem in the wiki from Jasper:
How can i stop the test, and the player..

Code: Select all

Next, test that recording works (you may need to restart your Pi) by recording some audio with the following command:

arecord temp.wav
Make sure you have speakers or headphones connected to the audio jack of your Pi. You can play back the recorded file:

aplay -D hw:1,0 temp.wav
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

I do have more other problems...

Code: Select all

aspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Feb 21 19:40:24 2016 from 192.168.5.5
pi@raspberrypi ~ $ /home/pi/jasper/jasper.py
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
No disturbance detected
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:48:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:49:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:49:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:50:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:50:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:51:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:51:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:52:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
INFO:client.stt:Transcribed: (u'JUST BUFFALO', u'JUST BELOW', u'JUST HELLO', u'DUST BUFFALO', u'JUST BLUFF HOLLOW')
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
INFO:client.stt:Transcribed: (u'WHAT IS THE WEATHER', u'WHAT IS THE MATTER', u'WHAT IS THE MOTHER', u'WHAT IS TOMORROW', u'WHAT IS THE WEATHER OF')
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:52:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
INFO:client.stt:Transcribed: (u"WHAT'S THE WEATHER TODAY", u"WHAT'S THE WEATHER TOMORROW")
WARNING:client.stt:Empty response: Nothing has been transcribed.
Look Jasper is running.
Looks the mic is working
The headphone is working one time, by the boot..
Where do i go wrong...

Is there a way that i can monitor my putty without a extra start of Jasper.

Edit:
Other problem.... A gmail block. :-(
ScreenShot043.jpg
ScreenShot043.jpg (74.75 KiB) Viewed 4646 times
Edit:
Fixed the Mail error..: ;) :D :D
ScreenShot044.jpg
ScreenShot044.jpg (100.12 KiB) Viewed 4641 times
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Derik wrote:Holiday so i give it a try.. :-)

1 problem in the wiki from Jasper:
How can i stop the test, and the player..

Code: Select all

Next, test that recording works (you may need to restart your Pi) by recording some audio with the following command:

arecord temp.wav
Make sure you have speakers or headphones connected to the audio jack of your Pi. You can play back the recorded file:

aplay -D hw:1,0 temp.wav
You can stop arecord by using: CTRL+c
You can also specify a duration: arecord -d 10 temp.wav
for a 10 second recording. The player also is stopped by CTRL+c
Basically anything in a unix system can be stopped using CTRL+c.
nlooije
Posts: 18
Joined: Wednesday 10 February 2016 14:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz voice recognition with Jasper

Post by nlooije »

Derik wrote:I do have more other problems...

Code: Select all

aspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Feb 21 19:40:24 2016 from 192.168.5.5
pi@raspberrypi ~ $ /home/pi/jasper/jasper.py
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
No disturbance detected
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:48:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:49:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:49:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:50:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:50:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:51:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:51:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:52:06 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
INFO:client.stt:Transcribed: (u'JUST BUFFALO', u'JUST BELOW', u'JUST HELLO', u'DUST BUFFALO', u'JUST BLUFF HOLLOW')
WARNING:client.stt:Empty response: Nothing has been transcribed.
WARNING:client.stt:Empty response: Nothing has been transcribed.
INFO:client.stt:Transcribed: (u'WHAT IS THE WEATHER', u'WHAT IS THE MATTER', u'WHAT IS THE MOTHER', u'WHAT IS TOMORROW', u'WHAT IS THE WEATHER OF')
WARNING:client.stt:Empty response: Nothing has been transcribed.
ERROR:apscheduler.executors.default:Job "Notifier.gather (trigger: interval[0:00:30], next run at: 2016-02-21 19:52:36 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 108, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "/home/pi/jasper/client/notifier.py", line 39, in gather
    [client.run() for client in self.notifiers]
  File "/home/pi/jasper/client/notifier.py", line 18, in run
    self.timestamp = self.gather(self.timestamp)
  File "/home/pi/jasper/client/notifier.py", line 43, in handleEmailNotifications
    emails = Gmail.fetchUnreadEmails(self.profile, since=lastDate)
  File "/home/pi/jasper/client/modules/Gmail.py", line 63, in fetchUnreadEmails
    conn.login(profile['gmail_address'], profile['gmail_password'])
  File "/usr/lib/python2.7/imaplib.py", line 507, in login
    raise self.error(dat[-1])
error: [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
INFO:client.stt:Transcribed: (u"WHAT'S THE WEATHER TODAY", u"WHAT'S THE WEATHER TOMORROW")
WARNING:client.stt:Empty response: Nothing has been transcribed.
Look Jasper is running.
Looks the mic is working
The headphone is working one time, by the boot..
Where do i go wrong...

Is there a way that i can monitor my putty without a extra start of Jasper.

Edit:
Other problem.... A gmail block. :-(
ScreenShot043.jpg
Edit:
Fixed the Mail error..: ;) :D :D
ScreenShot044.jpg
What do you mean 'where do i go wrong'? what problem are you experiencing?
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Domoticz voice recognition with Jasper

Post by Derik »

What do you mean 'where do i go wrong'? what problem are you experiencing?
Jasper is not talking back...

You can also specify a duration: arecord -d 10 temp.wav
And how can i play this simple ..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest