Example configurations

See some examples of SLU configurations! Use them as the scaffold for your application, or learn how to improve your own configuration.

We also accept user-submitted example configurations on this page! If you have an interesting configuration you’d like to share, please contact hello at speechly.com.

Home Automation

Intents

  • turn_on
  • turn_off

Entity types

  • device
  • location
rooms = [kitchen|bedroom|living room|closet|pantry|hallway|everywhere|all rooms|every room](location)
room = [{in} {the} $rooms]
list_of_rooms = [$room {{and} $room {{and} $room}}]
devices = [lights|television|radio|everything|all devices|every device](device)
device = [{the} {$rooms} $devices]
list_of_devices = [$device {0.3: and $device {0.3: and $device}}]
command = [turn|set|switch|put]
intent = [
    *turn_on {$command} $list_of_devices on {$list_of_rooms}
    *turn_on $command on $list_of_devices {$list_of_rooms}
    *turn_off {$command} $list_of_devices off {$list_of_rooms}
    *turn_off $command off $list_of_devices {$list_of_rooms}
]
$intent {and $intent}

Try it out

You can try this model by clicking the link below.

Try in Playground »

Example utterances:

  • turn on the lights in the kitchen
  • turn off the lights in the bedroom and in the living room
  • turn everything off

Coffee Ordering

Intents

  • order

Entities

  • size
  • type
  • addition
  • shot
ask = [i'd like to have | make me | order | i want | can I have | may I have] {[a | an]}
size = [small | medium | large](size)
shot = [single | double | triple](shot)
coffee = [coffee|regular coffee|americano|cappuccino|espresso|latte|cafe latte](coffee)
addition = [milk | cream | sugar | syrup](addition)
order = *order {$ask} {$size} {$shot} $coffee {with $addition {and $addition}} {please}

$order {{and} $order}

Try it out

You can try this model by clicking the link below.

Try in Playground »

Example utterances:

  • can I have a double espresso please
  • large cappuccino
  • make me a large cappuccino and a regular coffee

Calculator

Intents

  • calculate
  • append

Entities

  • number
  • operation
number = $SPEECHLY.CARDINAL_NUMBER(number)
operation = [plus|minus|times|divided by|to the power of](operation)
calculate = *calculate $number $operation $number
append = *append $operation $number

$calculate {$append {$append {$append}}}
$append

Try it out

You can try this model by clicking the link below.

Try in Playground »

Example utterances:

  • 36 plus 5
  • 4 times 20 plus 5
  • 77 plus 9 plus 4

Profile image for ottomatias

Last updated by ottomatias on November 24, 2020 at 13:38 +0200

Found an error on our documentation? Please file an issue or make a pull request