PINE64
Kalliope Voice Assistant on Mobian - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Debian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Kalliope Voice Assistant on Mobian (/showthread.php?tid=12055)



Kalliope Voice Assistant on Mobian - Lousy Fisherman - 11-06-2020

I have successfully ported the Kalliope voice assistant, https://kalliope-project.github.io/ , to the latest Mobian build, The process was fairly straightforward though the default trigger did have to be replaced with Mycroft Precise.

Add non-free to the Debian Bullseye entry in the apt sources.list config file.
Follow the kalliope install instructions for Debian Jessie
Install a starter kit
Install the precise trigger code for kalliope https://github.com/corus87/kalliope_trigger_precise
Configure trigger word
Start configuring your voice activated services!

HTH
LF


RE: Kalliope Voice Assistant on Mobian - bcnaz - 11-07-2020

That sounds very interesting,  does that require outside server/computer assistance to function, or is everything on your device.?

If it is just a voice interface to a Google/Amazon/Apple type of super computer,  then thanks, but No Thanks.


RE: Kalliope Voice Assistant on Mobian - Veraendert - 11-08-2020

Default is google but you seem to be able to switch to another STT: https://github.com/kalliope-project/kalliope/blob/master/docs/settings/settings.md


RE: Kalliope Voice Assistant on Mobian - Lousy Fisherman - 11-08-2020

No server is required, anywhere. The only outside service required at this time is a STT (speech to text) converter. Currently the most reliable is google. The local STT (CMUSphinx) is only usable by experts. While the use of Google for STT is not the best, it is not as big privacy leak as it appears. All google does in this case is recognize the words. Google does not know what actions are taken due to the words. This is very unlike any of the proprietary VA's as they do voice recognition and application execution. The framework is easily extensible and there are multiple STTs and TTSs available.

For example I have six URLs for internet radio.
Sheila, play radio alberta
Google will see the words play radio alberta but has no idea what radio station I am listening

I am currently building a neuron to make phone calls via voice command
Sheila, call Bob
Since google has no access to my contacts, google does not know who I am calling

I use the program on my home media machine as an Alexa/Google/Siri alternative. It is in a state very similar to the pinephone, it works, but it takes work to make it work. Smile

HTH
LF


RE: Kalliope Voice Assistant on Mobian - Lousy Fisherman - 11-08-2020

Working phone call neuron. Add to the brains directory as phone.yml

- name: "make_phonecall"
  signals:
  - order: "phone {{ person }}"
  neurons:
  - say:
      message: "Calling {{ person }}"
  - shell:
      cmd: "gnome-calls --dial {{ contacts[person] }}"
      async: TRUE


Currently the contact phone numbers are manually stored within Kalliope. Next is to query gnome-contacts or evolution for the phone numbers. Please note that the only data sent to google are the phonic representation of "phone" and the phonic representation of "person."

The biggest issue right now is the wakeword detector runs 100% of the time. Not a problem as a desktop hosted service. I have hacked a shutdown after 60 seconds of inactivity but it is irritating to have to wait for the application to load and restart. Talking to the kalliope devs about various ideas.

HTH
LF


RE: Kalliope Voice Assistant on Mobian - Lousy Fisherman - 11-13-2020

(11-08-2020, 02:33 PM)Lousy Fisherman Wrote: The biggest issue right now is the wakeword detector runs 100% of the time. Not a problem as a desktop hosted service. I have hacked a shutdown after 60 seconds of inactivity but it is irritating to have to wait for the application to load and restart. Talking to the kalliope devs about various ideas.

HTH
LF
I have submitted an upstream enhancement that will suspend the wakeword detector after a user defined period of time along with an desktop icon that sends a signal 18 (SIGCONT) to wake the detector up. This reduces CPU usage while idle from roughly 80% to 3%

HTH
LF


RE: Kalliope Voice Assistant on Mobian - Lousy Fisherman - 11-20-2020

And I have successfully built on Arch and Manjaro.

# load system python libraries
pacman -S python-gitpython python-pyaml python-pyaudio python-six python-markupsafe python-pyasn1 python-ansible
pacman -S python-jinja python-flask python-requests python-httpretty python-mock python-packaging python-sounddevice
pacman -S python-paho-mqtt python-gevent

The Arch package svox-pico-bin has not been ported to aarch64 yet. So I hacked the Debian versions to fit.
Grab the Debian aarch64 library packages from https://packages.debian.org/bullseye/all/
libttspico-data
libttspico-utils
libttspico0

I did the following on an x86 Arch machine as I have not built debtap on aarch64
debtap each package. During the build edit each package name and remove the "-git" from it
Additionally, while editing the build file for libttspico0 change aarch64/gnu/linux/glibc to just glibc
pacman -U the files produced by debtap. The order matters, first data, then the lib, then utils
The library files will be in /usr/lib/aarch64-gnu-linux. Move them to /usr/lib

sudo pacman -U ./libttspico-data-
sudo pacman -U ./libttspico0-
sudo pacman -U ./libttspico-utils-

sudo cp /usr/lib/aarch64-gnu-linux/libttspico* /usr/lib
sudo pip install precise_runner
sudo pip install kalliope    (wait, it is a 1 hour build now, down from 3 Smile
get the starter kit for your language
https://kalliope-project.github.io/starter_kit.html

kalliope install --git-url https://github.com/corus87/kalliope_trigger_precise.git

Configure and .....

"Sheila"
"Yes Boss"
"Phone Jim"
"Calling Jim"
......

Working on integrating location, so that queries like "tell me where the closest something is" will work.

Since I have Kalliope working on Arch/Manjaro I am dropping the Mobian work. I really don't want to but too many of the libraries in Debian are archaic, to put it politely, and  not suitable for a bleeding edge (amputee ward?) system like the Pinephone.

YMMV
LF