macaroni

speak

Description:
The speak executor is used to synthesize audio from text or ssml content, streaming it to a device or a file.

Parent: execute, then, else

Value (simple form): string specifying the text to speak
Value (sequence form): set of strings, specifying a set of text to be randomly selected to speak Value (key/value form):

# simple form
- speak: (string)

# simple example
- speak: Hello!

# sequence form
- speak:
- (string1, required)
- (string2, optional)
- (...)

# sequence example
- speak:
  - Hello!
  - Good morning!

# key/value form
- speak: (string, required if neither `ssml` nor `random` are provided)
  ssml: (bool, optional)
  voice: (string, optional)
  output: (string, optional)

# key/value example
- speak: |
    <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="http://www.w3.org/2001/mstts" xml:lang="en-US">
      <voice name="en-US-JennyNeural">
        A rainbow has seven colors: Red, orange, yellow, green, blue, indigo, and violet.
      </voice>
    </speak>
  ssml: true
  output: '{folders.desktop}\audio.wav'

EXAMPLE:

# randomly answers the question, are you listening
commands:
- name: are you listening
  triggers:
  - phrase: are you listening
  execute:
  - speak:
    - 'yes'
    - 'yes, i am'
    - 'you bet I am!'

Additional information:

Status: ✅ IMPLEMENTED (caveats: ssml, voice, and output not yet tested)