Standard Variables

Standard Variables make it easier to use common expressions in your configuration without having to write everything from scratch yourself

Introduction

Standard Variables are building blocks that make supporting certain common but somewhat complex expressions easier in your configuration. While you could construct these same expressions yourself in SAL, our predefined standard variables let you focus more on the unique aspects of your application.

The Standard Variables look like and are used like normal Variables, but you don’t have to define them in your configuration, because we’ve already done it for you. The Standard Variables can be identified by their names, which start with SPEECHLY.

You can see a standard variable being used in the example utterance below, which now permits various ways of expressing dates to be recognized by your application:

*book book a flight for $SPEECHLY.DATE(departure)

The above Template can expand for example to the following (just to name a few):

*book book a flight for january fifth twenty twenty one
*book book a flight for tomorrow
*book book a flight for second of november two thousand and twenty one

While Standard Variables can be used as such, if they appear as entity values, we also recommend assigning the entity in question the appropriate Data Type.

Below in the examples column individually spelled letters (e.g. h t t p) indicate that the user utterance can contain spelling.

Supported Standard Variables

Standard VariableExpands toExamples
$SPEECHLY.DATEDate expressionstomorrow, next Friday, January fifth twenty twenty
$SPEECHLY.TIMETime expressionsthree thirty pm, quarter past eleven, fifteen twenty five
$SPEECHLY.NUMBERArbitrary numbersfive million five hundred twenty-eight thousand eight point twelve, minus zero point zero five, eleven thousand
$SPEECHLY.CARDINAL_NUMBERArbitrary cardinalsfive million five hundred twenty-eight thousand eight, minus three, eleven hundred eleven
$SPEECHLY.SMALL_NUMBERSmall numbersseventeen point five, minus five
$SPEECHLY.SMALL_CARDINAL_NUMBERSmall cardinal numbersseventeen, minus five, ninety-five
$SPEECHLY.FOUR_DIGIT_NUMBERFour digit numbersfive six four nine, one nine eight four
$SPEECHLY.POSITIVE_NUMBERPositive numberseleven hundred eleven, seventeen, five million five hundred
$SPEECHLY.NEGATIVE_NUMBERNegative numbersminus five, negative twenty-four
$SPEECHLY.SMALL_ORDINAL_NUMBEROrdinal numbers 1-31first, second, thirty-first
$SPEECHLY.IDENTIFIER_SHORT1-4 character identifierzero zero seven x, alpha dash one, two seven
$SPEECHLY.IDENTIFIER_MEDIUM5-8 character identifiera b one two dash nine x, delta foxtrot five seven dash two
$SPEECHLY.IDENTIFIER_LONG9-12 character identifierone two seven dot zero dot zero dot one slash x y
$SPEECHLY.IDENTIFIER1-12 character identifiertwo seven, one two seven dot zero dot zero dot one slash x y
$SPEECHLY.PHONE_NUMBERPhone numbersplus three five eight four zero one two three four five six, one two three four five six
$SPEECHLY.PERSON_NAMEPerson namesamelia m earhart, john smith, _c o n a n o’brien
$SPEECHLY.EMAIL_ADDRESSEmail addresseshello at speechly dot com, john dot smith at company dot com
$SPEECHLY.WEB_ADDRESSWebsite addressesw w w dot speechly dot com, h t t p s colon slash slash docs dot speechly dot com
$SPEECHLY.STREET_ADDRESS(US style) Street addressesone twenty three michigan avenue, sixty four east twenty second street

Profile image for Antti Ukkonen

Last updated by Antti Ukkonen on August 19, 2021 at 13:24 +0300

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