Skip to content

play

This neuron plays a given sound file.

Input parameters

parameter required default choices comment
filename YES A single filename or a list of filenames for sound files that Kalliope should play (randomly picking one if a list). Please note that only ".wav" files should be used due to file modifications if conversion is required (in PlayerModule.convert_mp3_to_wav()

Returned values

No returned values

Synapses example

Simple example :

- name: "Play-jingle"
  signals:
    - order: "play jingle"
  neurons:
    - play:
        filename: "resources/files/jingle.wav"

With a multiple choice list, Kalliope will pick one randomly:

- name: "Play-random-jingle"
  signals:
    - order: "play random jingle"
  neurons:
    - play:
        filename:
          - "resources/files/jingle1.wav"
          - "resources/files/jingle2.wav"
          - "resources/files/jingle3.wav"

Play a sound instead of saying somthing after being triggered (the signal has to be configured accordingly in settings.yml):

  - name: "on-triggered-synapse"
    signals: []
    neurons:
      - play:
          file: "resources/files/dong.wav"

Notes

Note: The neuron does not return any values.

Note: Kalliope randomly takes a filename from the list