Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 17 07:47
    dvelascoa synchronize #645
  • Nov 16 12:48
    dvelascoa synchronize #645
  • Nov 16 12:23
    dvelascoa opened #645
  • Nov 05 21:34
    SXXXR closed #576
  • Nov 01 13:55
    veka-server commented #606
  • Nov 01 12:09
    jig0r0 opened #644
  • Oct 14 06:00
    Sispheor commented #643
  • Oct 14 06:00

    Sispheor on dev

    Fix gevent segmentation fault (compare)

  • Oct 14 06:00
    Sispheor closed #643
  • Oct 13 16:14
    corus87 commented #643
  • Oct 13 16:08
    Sispheor commented #643
  • Oct 13 16:08
    Sispheor commented #643
  • Oct 12 14:37
    corus87 opened #643
  • Oct 12 14:16
    corus87 commented #641
  • Oct 12 14:03
    corus87 commented #641
  • Oct 12 13:15
    Sispheor commented #641
  • Oct 12 13:08
    corus87 commented #641
  • Oct 12 13:08
    corus87 commented #641
  • Oct 12 13:03
    corus87 opened #642
  • Oct 07 19:32
    corus87 commented #641
SXXXR
@SXXXR
Have you checked your spaces in your brain? I once had the same error, it was because of wrong spacing and yaml is really sensitive about that.
SXXXR
@SXXXR
@arnodu59115 any update?
SXXXR
@SXXXR
I coded a super simple onesy script as kalliope client to my existing Server. Only containing snowboy -> googletts -> Rest API (ordercall via txt) -> Polly TTS now my thought is: if we remove STT, TTS, Snowboy and Players from actual kalliope it should be a server client architecture. But I think I'm not skilled enough to read through all the code and erase all tracks of this modules. Does someone of the main devs has like a flowchart including the modules?
1001111github
@1001111github
Questions:
Trying to build on a Mobian Pinephone, ARM64, Debian Bullseye. I installed the dependencies, I am able to build kalliope (3 hour build time, lol), loaded the english starter kit and now Kalliope complains about no module _snowboydetect? I am unsure where the module comes from. Is it a dependency or part of the kalliope build?
Arch/Manjaro build I am deep in trying to determine which math libraries are needed along with trying to fix the version of Fortran. In Arch there is an AUR build for kalliope that fails on a flask dependency. Any ideas on what to look for. There is also a package for snowboy. How would one integrate that into kalliope?
1001111github
@1001111github
Python questions, if this is not a good place for these please direct me eslewhere?
I have a perl background among others, Is there a way to precompile python apps into memory on startup? How do people deal with with the single-thread limitation?
Patrick
@corus87

It won't find the needed _snowboydetect.so binary because we do not support arm64 yet.
You may try to compile _snowboydetect.so by yourself, try this on your arm64.

Currently there is no kalliope developer with a arm64 pi or something else to test it, so we cannot support it. But if you got some coding background, maybe you can get it running :)

Patrick
@corus87
@SXXXR I was already thinking about something similar, just a client which support the trigger, STT and TTS and the rest is done with the API. It shouldn't be too much to code something like this, but I don't have much time lately, but it is on my to-do list :)
SXXXR
@SXXXR
@corus87 my client barely consists of 100 lines of code. It's working good so far. My problem is the generated text from rest API is returned after the neuron is completely processed. It takes about 30 seconds to cpmplety
Completely shut down my entertainment system through harmony hub until the client speaks the response.
1001111github
@1001111github
@corus87 Thank you, I found some libraries that may work but I am trying your precise trigger instead since sinking effort into snowboy appears to be a waste of effort. Is it, precise still the planned future trigger for Kalliope?
1001111github
@1001111github
Success!!!!!!
Mobian (Debian Bullseye) on a Pinephone, aarch64, version 0.70 with the precise trigger. Not thoroughly tested but wakes when triggered and the basic starter kit neurons work.
1001111github
@1001111github

So, on a phone kalliope should be explicitly started via an icon on the home screen. Is there a preferred icon for this purpose?
The second requirement is the Voice Assistant should shutdown after use and if the phone itself suspends or sleeps. I have found the main loop and have hacked it to shutdown after 5 minutes no matter what.

max_time = 300
start_time = time.time() # remember when we started
while (time.time() - start_time) < max_time:
time.sleep(0.1)

Obviously the correct method is to shutdown 10-30 seconds after the last neuron executes but I don't know how to extract that information, yet :)
The other implementation issue is catching the phone suspend notification. I believe that is put out on the dbus but I will confirm that with the OS devs at forum.pine64.org. Catch a signal, call the die() neuron he said hopefully :)

I have successfully migrated my sound machine (custom Ubuntu) to version 0.7.0 using snowboy. I am going to install precise into this instance as it seems to work (much?) better. Granted, this is based on 2 very different input environments, phone versus conference room microphone, but the sound machine with snowboy "feels" sluggish whereas kalliope on the phone (with the precise trigger) "feels" attentive :).

Thanks to all for their work on this
1001111github
@1001111github
Created a global variable finish_time. Added the following line to order.py in
after the SynapseLauncher call in analysing_order_thread settings.variables["finish_time"] = time.time()
the following replaces the while true loop in kalliope main
maxtime = 60
settings.variables["finish_time"] = time.time()
while settings.variables["finish_time"] > time.time() - maxtime:  # keep alive
    time.sleep(0.1)
I have no idea of the implications of this hack or the proper way to do it but it works :) Kalliope dies after 1 minute of inactivity
1001111github
@1001111github

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.
Whats with the markup language here? lol

The above automated shutdown process, while effective, is not really practical as the startup time becoes extreemly irritating :) In order to avoid this I am going to try to implement the following but I really need feedback and input as to whether this
is a reasonable approach or not.

Add the time.time() call to order.py
Add a desktop icon and shell script that uses REST to run a synapse to wakeup a sleeping kalliope process
Alter the main thread loop to sleep for very short periods while active, then sleep until manually woke

while 1:
maxtime = 60
settings.variables["finish_time"] = time.time()
while settings.variables["finish_time"] > time.time() - maxtime: # keep alive
time.sleep(0.1)
time.sleep(30000) # > 8 hours

And, I don't understand why I had to add finish_time to the variables.yml file. My understanding is that it is automagically created when I try to instantiate it. Am I wrong?

Thanks to all
1001111github
@1001111github
2020-11-10 17:49:45 :: kalliope-0.7.0 :: Entering thread wait
2020-11-10 17:49:45 :: kalliope-0.7.0 :: 1605055765.0173535
2020-11-10 17:49:45 :: kalliope-0.7.0 :: 1605055785.0529842
Interrupted by 18, waking up
Puts down his chainsaw, wipes brow, looks at the devastation in his wake :)
1001111github
@1001111github
The only question I have at this point is should the "work is all done" time call be done in the base class signal or the base class synapse? I had to replace the long term sleep above with a threading.Event.wait call so I can interrupt at will. The diff impacts kalliope main (1 new signal handler, roughly 20-25 lines implementing loop logic) and order.py (2 lines) Two of my variables, max_time and finish_time should be configuration variables. I have coded so that max_time=0 uses the original while True loop. "Desktop" mode :)
People really like the speed improvement in 0.70. Instead of getting frustrated at the machine when it does not understand as they did at 0.60, they now blame themselves for rushing, or slurring or....
Thanks to all
Riseryn
@Riseryn
Due to a problem caused by an application which changed the version of pyaml to an older version, I had to reinstall kalliope. Since then I have the following messages when starting kalliope.
pi@raspberrypi:~/kalliope_starter_fr $ kalliope start
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
Starting REST API Listening port: 5000
Starting Kalliope
Press Ctrl+C for stopping
Starting order signal
Init Signal :Geolocation
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
Init Signal :Event
[Event] Starting manager
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
/usr/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 72 from C header, got 76 from PyObject
  return f(*args, **kwds)
je suis prĂȘte
Waiting for trigger detection
1001111github
@1001111github
First reall architectural problem I have hit: There are 2 simultaneous (after the first order) independent polling loops. Kalliope main & order.waiting_for_trigger_callback_thread.
I do not know enough about python to be able to work this through from OS signal to Order callbacks. I can control one or the other of both threads but then the other thread is still running burning CPU. and responding :(
Riseryn
@Riseryn
Kalliope is totally inusable. I need help. After
Waiting for trigger detection
Erreur de segmentation
Riseryn
@Riseryn
ok i find the solution in previous posts sudo pip3 install -U gevent
1001111github
@1001111github
Okay, I figured it out. I have it all working. I do not have authority do a
git push origin wakeup
1001111github
@1001111github
And I figured out the problems with the Arch build. All related to snowboy. A standard install pip install kalliope, add the precise trigger. everything works. The "sheila" wakeword has been the most functional so far
SXXXR
@SXXXR
Can I ask how many synapses you guys have? My response speed of Polly TTS dropped down heavy. I have about 70 synapses in total. Added anchors in yaml (because I wanted to spare me coding) and response took about 10 seconds after order was found even with caching the TTS.
I'll try to determine it myself, but maybe someone has experienced this?
SXXXR
@SXXXR
Just for information: if you use anchors in yaml then TTS will not cache the messages - resulting in longer response time from online TTS API (in my case amazon polly)
SXXXR
@SXXXR
I think we really need a forum
SXXXR
@SXXXR
Okay I got response time back down to 4 seconds. After some profiling I see the NeuronModule[TTSargs] takes about 4 seconds to run, PollyTTS speaks in less than a second.. Any suggestions?
Nicolas Marcq
@Sispheor
I'll see how I can deploy a discourse forum
I have a server
and maybe an URL
1001111github
@1001111github
@ Riseryn, check out geoclue. In most distros.
# implements a GeoClueSimpleObject
# https://www.freedesktop.org/software/geoclue/docs/libgeoclue/GClueSimple.html
import gi
gi.require_version('Geoclue', '2.0')
from gi.repository  import Geoclue
clue = Geoclue.Simple.new_sync('kalliope.desktop',Geoclue.AccuracyLevel.EXACT,None)
location = clue.get_location()
print(location.get_property('latitude'), location.get_property('longitude'))
Riseryn
@Riseryn
@1001111github thanks i will look at it