Voice Control - New Pet for any Pup V4 - 10th September 2017

Miscellaneous tools
Post Reply
Message
Author
User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Voice Control - New Pet for any Pup V4 - 10th September 2017

#1 Post by ETP »

.
Background Notes: for Version 1 (Sept 2015)

Voice control implementation is usually a complex mass of scripts, dependencies, python and fuzzy logic to make sense of what the speech API may return.
If using Google voice search it can swiftly become something of a nightmare.

This pet whilst still using Google Voice Search, is an attempt to simplify matters by using voice search in a different way and utilises a single bash script plus numbered “launchers
Attachments
image-2.png
Simple text menu - edit as you desire
(83.91 KiB) Downloaded 1274 times
Last edited by ETP on Sun 10 Sep 2017, 08:17, edited 10 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Houston we have Voice Control - Pet for any Pup.

#2 Post by ETP »

.
Reserved for Additional info, tips & FAQ:

Q&A:

Q. Can I use Chromium instead of Google Chrome?

A. Yes. In the vcfront_end script just change the single reference to google-chrome on line 8 to chromium

Q. Why the requirement for VLC?

A. Two of the examples use it but more importantly VLC is due to get the CLI ability to cast to a Chromecast dongle and possibly to any DLNA renderer such as a smart TV.
Casting to such a device by voice will then be possible with a suitable numbered launcher script for each movie that you have on disc.

Q. Is the front-end menu really needed?

A. No. If you prefer to stick a big list on your wall the relevant lines in the main script can be edited so that the pause key will take you straight to Google Voice Search.

Q. Can the period that the menu is displayed be changed?

A. Yes. By default it is set to 15 seconds in line 9 of vcfront_end.
I would recommend a minimum of 1 second with no upper limit on the maximum. Setting it to 1 or 1.5 seconds will speed things up considerably
whilst still providing a quick glimpse of the menu options.

Q. Can the "Endgame" in launcher number 60 be used as a voice activated screensaver?

A: Yes. Comment out all the existing lines in 60 then add the following line:

Code: Select all

vlc --fullscreen --loop /root/noob/files/blue_ss.webm &
Last edited by ETP on Tue 13 Oct 2015, 07:10, edited 2 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

gcmartin

#3 Post by gcmartin »

Thanks. You are advancing PUP from the back-room/family-room/home-office to the armchair laptop and the ability to vocally command it to act. What a great idea for 21st century Puppy kennel.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Houston we have Voice Control - Pet for any Pup - Sept 2015

#4 Post by ETP »

Update:

In the FAQ above I mentioned eliminating the display of the menu completely when a poster
on the wall is preferred to list the numbers & their associated purposes.

The attached file is a version of the "vcfront_end" script that does that and you will be invited
to speak 3 seconds after pressing the pause key or clicking the microphone icon.

Once you get used to this concept, you may wish to adopt this way of doing things which is my own
personal preference.

Please make sure that you back up the original "vcfront_end" script & then substitute the one below ensuring that it is executable.
Attachments
vcfront_end.gz
Please remove false .gz
(1.18 KiB) Downloaded 306 times
Last edited by ETP on Wed 04 Nov 2015, 08:43, edited 2 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#5 Post by tallboy »

ETP, I tip my hat to you. This is a really clever :idea: !
Making use of already existing programs in a new way to make an application is also a very sensible approach, no need to reinvent the wheel every time you have an idea. :D

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Houston we have Voice Control - Pet for any Pup - Feb 2016

#6 Post by ETP »

Version 3 of the Voice Control Pet issued Feb 2016

Prerequisites for V3 Pet: (Slight change from V1)
  • Active Internet connection

    Google Chrome or Chromium ( With working voice search. “O/K Google
Attachments
vcmenu.txt.gz
Please remove false .gz
(703 Bytes) Downloaded 302 times
menu.png
OOTB Menu items. The numbered scripts also serve as templates.
(84.49 KiB) Downloaded 800 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Pelo

oh voice control is great interest for me..

#7 Post by Pelo »

oh voice control is great interest for me... No real need, but for fun..
Windows 7 has a voice recorder included. The more you use it ... the less it :)Works
with Puppy, if with Precord we register our vocal order 'Abiword', Puppy could open it, that would be useless, but nice..
In fact it would be a Pfind, not with letters, but with audio.
If it find an audio similar, it launches abiword
Foolish, or not foolish ?

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Voice Control - New Pet for any Pup V3 - Feb 2016

#8 Post by ETP »

Hi Pelo,

Voice control is certainly fun and can be very convenient. This pet can also be used as
the basis for an accessibility Pup.
There is no need to start recording command words. It is meant to be simple.
If you wanted to launch "Abiword" by voice open up the template script number 20 which currently reads as follows:

Code: Select all

#!/bin/sh
#exec /usr/bin/thunderbird "$@"
defaultemail &
Save it as script number 21 then edit it to read as below:

Code: Select all

#!/bin/sh
#exec /usr/bin/thunderbird "$@"
#defaultemail &
defaultwordprocessor &
Press the pause key and when the instruction “Speak now
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Pelo

Good idea

#9 Post by Pelo »

:wink: hum, good idea... being tried soon.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Voice Control - Pet for any Pup - 10th Sept 2017

#10 Post by ETP »

Version 4 of the Voice Control Pet issued 10th Sept 2017

Prerequisites for V4 Pet: ( A few changes here )

Active Internet connection

Google Chrome or Chromium ( With reliable [95%] working voice search. Please see final thoughts plus tips )

Chrome or Chromium must be set as the default browser.

mpv ( Change from vlc. Install via PPM/QPM if not already present )

xdotool ( Install via PPM/QPM if not already present )

xclip (In most Pups - check with pfind)

Xclipboard (In most Pups - check with pfind - Disable any other running clipboard)


Changes in this version:

The initial display of the front end menu is still eliminated so that the red microphone and the instruction
to "Speak now" will appear within about 3 seconds of pressing the pause key.
A copy of the menu is reproduced in the previous V3 post and it is also attached there as a text file that can be printed out.
(It may also be displayed by pressing the pause key and then saying ONE + ZERO when invited to speak)

Numerous major improvements to the main script plus minor changes to the launcher scripts.

The script now searches for the first number in the question which means that even if Chrome heard
the question SIXTY PLUS ZERO as 60 + 10 rather than 60 + 0 only the digits in front of the plus sign
are extracted and script 60 would still be launched.

Launcher Scripts:

O.O.T.B. the pet contains 7 numbered launcher scripts ( 20, 30, 31, 32, 60, 61, 62)
These serve as both examples and templates. Pick the one that most resembles your needs, save it as a new number, then edit it to launch the app/script/url of your choice.
Each new launcher script that you create can perform any action you wish the only limit being your imagination.

Where to get the V4 Pet:

https://drive.google.com/folderview?id= ... sp=sharing

Setup Procedure:

1. Check that you have Google Voice search working & that the prerequisites are met.

2. Install the pet.

3. Drag the .desktop file onto the desktop. Assign it the “Pause
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

hamoudoudou

First step done, icone on desktop, pause as shortkey.

#11 Post by hamoudoudou »

I hope Triton 6.0 will do it.. First step done, icone on desktop, pause as shortkey.
"Thanks. You are advancing PUP from the back-room/family-room/home-office to the armchair laptop and the ability to vocally command it to act. What a great idea for 21st century Puppy kennel. " gcMartin hopes
Things go to first vocal command then Chromium crashes. :(
Attachments
micro.jpg
Activer le cadenas, click droit, mettre capture et pas micro !
(54.49 KiB) Downloaded 214 times
Last edited by hamoudoudou on Thu 26 Oct 2017, 13:22, edited 1 time in total.

hamoudoudou

As Chrome crashes with Pet Voice control, pet removed.

#12 Post by hamoudoudou »

As Chrome crashes with Pet Voice control, pet removed. Deceived, Voice Control is more a challenge than 1734th Puppy to test

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Voice Control - New Pet for any Pup V4 - 10th September 2017

#13 Post by ETP »

Hi hamoudoudou,

The version of Chrome that you are using appears to be old and problematic. ( 30 something? )
I say that because "Identity not verified" on www.google.fr indicates that a security certificate within Chrome for that site has expired.
It must therefore be a very old version.
In addition you are not seeing a "microphone" entry on the drop down list only a "media" entry.
Location also needs to be set to "allowed " for correct operation of Google voice search which must be working before
you install and use the pet.

The pet itself does not install anything within Chrome. It merely invokes key combinations that already exist in Chrome.

Corrrect selection and level setting of the microphone itself is also vital.
I have uploaded 3 screen shots to a folder showing these points using google.fr
Voice search to that works from the UK so should function from Morocco.

https://drive.google.com/folderview?id= ... sp=sharing
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Post Reply