-- Leo's gemini proxy

-- Connecting to gmi.bacardi55.io:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

Kalliope community modules and the Picamera neuron

Posted on 2017-01-03


Kalliope[1] has recently introduced the "community module" system that will help user share neurons, tts and stt easily via a simple git url.


1: https://github.com/kalliope-project/kalliope


This blog introduce quickly how it works and update the installation process of the picamera simple neurons to this method


Introducing the community neurons system


Goal here is to provide a way for the user to share their neurons. I believe the team are (or will) work on a "market place" for neurons, but as of today, the list is only available on the github doc page here[2], so you'll have to create a pull request to add your custom neuron in this list.


2: https://github.com/kalliope-project/kalliope/blob/master/Docs/neuron_list.md


The neurons needs to be on a dedicated git repository and contains a dna.yml and a install.yml files on top of the python code of your neuron


dna.yml[3] file contains the description of the module, including its name, the version of kalliope supported and some tags.


3: https://github.com/kalliope-project/kalliope/blob/master/Docs/contributing/dna.md


install.yml[4] file contains an ansible playbook that will which include the dependencies that might need to be installed when installing the neuron (could be via pip or apt-get). It uses ansible[5] behind the scene to do so.


4:

5: https://www.ansible.com/


More information about creating your neurons here[6].


6: https://github.com/kalliope-project/kalliope/blob/master/Docs/contributing/contribute_neuron.md


Example with picamera neuron


So following the new rules, I've created a dedicated repository for the picamera neuron that can be found here[7]. As the doc says, you just need to do


7: https://github.com/bacardi55/kalliope-picamera


    kalliope install --git-url https://github.com/bacardi55/kalliope-picamera

And it should install the picamera python library as well as cloning your repo in your neuron resource directory.


The neuron resource directory is set in the settings.yml like this:


    resource_directory:
      neuron: "resources/neurons"
      stt: "resources/stt"
      tts: "resources/tts"

Then, as before, you can create a brain to use this neuron like this:


    ---
      - name: "Take-pictures"
        signals:
          - order: "take pictures"
        neurons:
          - camera:
              number_of_picture: 3
              directory: "/home/pi/Desktop/PIctures/"
              timer: 1
          - say:
              message: "Picture taken"

And voilĂ !



/gemlog/


Send me a gemini mention

send me an email!

-- Response ended

-- Page fetched on Tue May 21 02:31:16 2024