Builtins

The data pack may include one or more builtins, which are predefined recognition objects focused on common tasks (numbers, dates, and so on) or general information in a vertical domain such as financial services or healthcare. The available builtins depends on the data pack. For American English data packs, for example, the builtins are:

ALPHANUM           DOUBLE            TEMPERATURE
AMOUNT             DURATION          TIME
BOOLEAN            DURATION_RANGE    VERT_FINANCIAL_SERVICES
CALENDARX          GENERIC_ORDER     VERT_HEALTHCARE
CARDINAL_NUMBER    GLOBAL            VERT_TELECOMMUNICATIONS
DATE               NUMBERS           VERT_TRAVEL
DIGITS             ORDINAL_NUMBER
DISTANCE           QUANTITY_REL

To use a builtin in ASRaaS, specify it as builtin in RecognitionInitMessage: RecognitionResource.

Optionally give it a weight with weight_value or weight_enum. The default weight for each declared builtin is 0.25 or MEDIUM. See Resource weights.

# Define builtins
cal_builtin = RecognitionResource(
    builtin = 'CALENDARX',
    weight_value = 0.2
)

distance_builtin = RecognitionResource(
    builtin ='DISTANCE',
    weight_value = 0.2
)

# Include builtins in RecognitionInitMessage
init = RecognitionInitMessage(
    parameters = RecognitionParameters(
        language = 'en-US',
        topic = 'GEN',
        audio_format = AudioFormat(pcm=PCM(sample_rate_hz=16000))
    ),
    resources = [cal_builtin, distance_builtin]
)