Table Of Contents

Previous topic

Processors

Next topic

SUttProcessor Structure

Utterance Processor

An Utterance Processor processes an utterance by extracting information from it and then modifying it in some way.

Definitions

speect object SUttProcessor

Inheritance diagram of SObject.SUttProcessor

The SUttProcessor structure.

A processor for utterances.

SUttProcessor Structure

speect class SUttProcessorClass

Inheritance diagram of SObjectClass.SUttProcessorClass

The SUttProcessorClass structure.

SUttProcessorClass Structure

Macros

macro S_UTTPROCESSOR(SELF)

Return the given SUttProcessor child class object as a SUttProcessor object.

Parameters:
  • SELF

    The given object.

Return:

Given object as SUttProcessor* type.

Note:

This casting is not safety checked.

Functions

Initialization

void SUttProcessorInit(SUttProcessor **self, const SVoice *voice, s_erc *error)

Initialize the utterance processor.

Used for initialization of the utterance processor feature classes on loading of the voices.

Parameters:
  • self

    The UttProcessor to initialize.

  • voice

    The voice that the utterance processor belongs to.

  • error

    Error code.

Note:

If this function failed the utterance processor is deleted and the self variable is set to NULL.

Run

void SUttProcessorRun(const SUttProcessor *self, SUtterance *utt, s_erc *error)

Execute the UttProcessor on the given utterance.

Parameters:
  • self

    The UttProcessor to execute.

  • utt

    The utterance on which to execute the UttProcessor.

  • error

    Error code.

Return:

Pointer to utt.

Features

const SObject *SUttProcessorGetFeature(const SUttProcessor *self, const char *key, s_erc *error)

Get the feature object of the named key from the given UttProcessor.

Parameters:
  • self

    The given UttProcessor.

  • key

    The string key of the feature processor object to get.

  • error

    Error code.

Return:

Pointer to SObject object feature value.

void SUttProcessorSetFeature(SUttProcessor *self, const char *key, const SObject *object, s_erc *error)

Set the feature of the named key to the given SObject.

If the named key already exists then it’s SObject will be deleted (if not referenced) and replaced.

Parameters:
  • self

    The given name.

  • key

    The string key of the feature object to set.

  • object

    The feature object (value).

  • error

    Error code.

void SUttProcessorDelFeature(SUttProcessor *self, const char *name, s_erc *error)

Delete the feature of the named key of the the given UttProcessor.

The key is removed and the feature object deleted if it is not referenced.

Parameters:
  • self

    The given name.

  • name

    The feature name (key).

  • error

    Error code.

s_bool SUttProcessorFeatureIsPresent(const SUttProcessor *self, const char *name, s_erc *error)

Query if named feature is present in the given UttProcessor.

Parameters:
  • self

    The given UttProcessor.

  • name

    The feature name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.