Table Of Contents

Previous topic

Voice Manager

Next topic

SVoice Structure

SVoice

The voice object, SVoice, encapsulates the voice resources, definitions and functions.

Summary

SVoiceSynthUtt Synthesize an utterance with the given utterance type and input.
SVoiceReSynthUtt Re-synthesize an utterance with the given utterance type.
SVoiceGetName Get the given voice’s name.
SVoiceGetDescription Get the given voice’s description.
SVoiceGetGender Get the given voice’s gender.
SVoiceGetLanguage Get the given voice’s language.
SVoiceGetLangCode Get the given voice’s ISO 639-2 language code.
SVoiceGetVersion Get the given voice’s version.
SVoiceGetDataKeys Get a list of the data keys in the voice.
SVoiceDataIsPresent Query if named data object is present in the given voice.
SVoiceGetData Get the voice data object of the named key.
SVoiceSetData Set the value of the named voice data key to the given SObject.
SVoiceDelData Delete the value of the named key from the voice data container.
SVoiceGetFeatureKeys Get a list of the feature keys in the voice.
SVoiceFeatureIsPresent Query if named feature object is present in the given voice.
SVoiceGetFeature Get the voice feature object of the named key.
SVoiceSetFeature Set the value of the named voice feature key to the given SObject.
SVoiceDelFeature Delete the value of the named key from the voice feature container.
SVoiceGetFeatProcKeys Get a list of the feature processor keys in the voice.
SVoiceFeatProcIsPresent Query if named feature processor is present in the given voice.
SVoiceGetFeatProc Get the voice feature processor object of the named key.
SVoiceSetFeatProc Set the value of the named voice feature processor key to the given SFeatProcessor.
SVoiceDelFeatProc Delete the value of the named key from the voice feature processor container.
SVoiceGetUttProcKeys Get a list of the utterance processor keys in the voice.
SVoiceUttProcIsPresent Query if named utterance processor is present in the given voice.
SVoiceGetUttProc Get the voice utterance processor object of the named key.
SVoiceSetUttProc Set the value of the named voice utterance processor key to the given SUttProcessor.
SVoiceDelUttProc Delete the value of the named key from the voice utterance processor container.
SVoiceGetUttTypesKeys Get a list of the voice utterance type keys in the voice.
SVoiceUttTypeIsPresent Query if named utterance type is present in the given voice.
SVoiceGetUttType Get the voice utterance type object of the named key.
SVoiceSetUttType Set the value of the named voice utterance type key to the given SList of string objects of the utterance processors defined for the utterance type.
SVoiceDelUttType Delete the value of the named key from the voice utterance type container.

Definitions

speect object SVoice

Inheritance diagram of SObject.SVoice

The SVoice structure.

SVoice Structure

speect class SVoiceClass

Inheritance diagram of SObjectClass.SVoiceClass

The SVoiceClass structure.

SVoiceClass Structure

Functions

Synthesis

SUtterance *SVoiceSynthUtt(const SVoice *self, const char *utt_type, SObject *input, s_erc *error)

Synthesize an utterance with the given utterance type and input.

Parameters:
  • self

    The voice used for synthesis.

  • utt_type

    The key of the utterance type as registered in the SVoiceuttTypes container.

  • input

    The input to the synthesizer.

  • error

    Error code.

Return:

The synthesized utterance.

Note:

The caller is responsible for the memory of the returned utterance.

The voice takes hold of the inputSObject

void SVoiceReSynthUtt(const SVoice *self, const char *utt_type, SUtterance *utt, s_erc *error)

Re-synthesize an utterance with the given utterance type.

This is used when an utterance was synthesized with a certain utterance type, and now it must be synthesized with a different utterance type.

Parameters:
  • self

    The voice used for synthesis.

  • utt_type

    The key of the utterance type as registered in the SVoiceuttTypes container.

  • utt

    The utterance to re-synthesize.

  • error

    Error code.

Information

const char *SVoiceGetName(const SVoice *self, s_erc *error)

Get the given voice’s name.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s name.

const char *SVoiceGetDescription(const SVoice *self, s_erc *error)

Get the given voice’s description.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s description.

const char *SVoiceGetGender(const SVoice *self, s_erc *error)

Get the given voice’s gender.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s gender.

const char *SVoiceGetLanguage(const SVoice *self, s_erc *error)

Get the given voice’s language.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s language.

const char *SVoiceGetLangCode(const SVoice *self, s_erc *error)

Get the given voice’s ISO 639-2 language code.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s language code.

Note:

See http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes for the language codes.

const s_version *SVoiceGetVersion(const SVoice *self, s_erc *error)

Get the given voice’s version.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

Pointer to voice’s version.

Data

SList *SVoiceGetDataKeys(const SVoice *self, s_erc *error)

Get a list of the data keys in the voice.

The list objects (keys) are string objects and are accessed with SObjectGetString.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

SList of keys, or NULL if the data container is empty.

Note:

The caller is responsible for the memory of the returned SList object.

s_bool SVoiceDataIsPresent(const SVoice *self, const char *name, s_erc *error)

Query if named data object is present in the given voice.

Parameters:
  • self

    The given voice.

  • name

    The data object name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

const SObject *SVoiceGetData(const SVoice *self, const char *key, s_erc *error)

Get the voice data object of the named key.

Parameters:
  • self

    The given voice.

  • key

    The string key of the data object to get.

  • error

    Error code.

Return:

Pointer to the data object of the named key, or NULL if data of named key is not present in voice.

void SVoiceSetData(SVoice *self, const char *key, SObject *object, s_erc *error)

Set the value of the named voice data 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 voice.

  • key

    The string key of the data object to set.

  • object

    Pointer to the data object of the named key.

  • error

    Error code.

Note:

The voice takes hold of the objectSObject.

void SVoiceDelData(SVoice *self, const char *key, s_erc *error)

Delete the value of the named key from the voice data container.

The key is removed and value deleted if it is not referenced.

Parameters:
  • self

    The given voice.

  • key

    The string key of the data object to delete.

  • error

    Error code.

Features

SList *SVoiceGetFeatureKeys(const SVoice *self, s_erc *error)

Get a list of the feature keys in the voice.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

SList of keys, or NULL if the feature container is empty. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

The caller is responsible for the memory of the returned SList object.

s_bool SVoiceFeatureIsPresent(const SVoice *self, const char *name, s_erc *error)

Query if named feature object is present in the given voice.

Parameters:
  • self

    The given voice.

  • name

    The feature object name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

const SObject *SVoiceGetFeature(const SVoice *self, const char *key, s_erc *error)

Get the voice feature object of the named key.

Parameters:
  • self

    The given voice.

  • key

    The string key of the feature object to get.

  • error

    Error code.

Return:

Pointer to the feature object of the named key, or NULL if feature of named key is not present in voice.

void SVoiceSetFeature(SVoice *self, const char *key, SObject *object, s_erc *error)

Set the value of the named voice feature 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 voice.

  • key

    The string key of the feature object to set.

  • object

    Pointer to the feature object of the named key.

  • error

    Error code.

Note:

The voice takes hold of the objectSObject.

void SVoiceDelFeature(SVoice *self, const char *key, s_erc *error)

Delete the value of the named key from the voice feature container.

The key is removed and value deleted if it is not referenced.

Parameters:
  • self

    The given voice.

  • key

    The string key of the feature object to delete.

  • error

    Error code.

Feature Processors

SList *SVoiceGetFeatProcKeys(const SVoice *self, s_erc *error)

Get a list of the feature processor keys in the voice.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

SList of keys, or NULL if the feature processor container is empty. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

The caller is responsible for the memory of the returned SList object.

s_bool SVoiceFeatProcIsPresent(const SVoice *self, const char *name, s_erc *error)

Query if named feature processor is present in the given voice.

Parameters:
  • self

    The given voice.

  • name

    The feature processor name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

const SFeatProcessor *SVoiceGetFeatProc(const SVoice *self, const char *key, s_erc *error)

Get the voice feature processor object of the named key.

Parameters:
  • self

    The given voice.

  • key

    The string key of the feature processor object to get.

  • error

    Error code.

Return:

Pointer to the feature processor object of the named key, or NULL if feature processor of named key is not present in voice.

void SVoiceSetFeatProc(SVoice *self, const char *key, SFeatProcessor *featProc, s_erc *error)

Set the value of the named voice feature processor key to the given SFeatProcessor.

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

Parameters:
  • self

    The given voice.

  • key

    The string key of the feature processor object to set.

  • featProc

    Pointer to the feature processor of the named key.

  • error

    Error code.

Note:

The voice takes hold of the featProcSFeatProcessor.

void SVoiceDelFeatProc(SVoice *self, const char *key, s_erc *error)

Delete the value of the named key from the voice feature processor container.

The key is removed and value deleted if it is not referenced.

Parameters:
  • self

    The given voice.

  • key

    The string key of the feature processor object to delete.

  • error

    Error code.

Utterance Processors

SList *SVoiceGetUttProcKeys(const SVoice *self, s_erc *error)

Get a list of the utterance processor keys in the voice.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

SList of keys, or NULL if the utterance processor container is empty. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

The caller is responsible for the memory of the returned SList object.

s_bool SVoiceUttProcIsPresent(const SVoice *self, const char *name, s_erc *error)

Query if named utterance processor is present in the given voice.

Parameters:
  • self

    The given voice.

  • name

    The utterance processor name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

const SUttProcessor *SVoiceGetUttProc(const SVoice *self, const char *key, s_erc *error)

Get the voice utterance processor object of the named key.

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance processor object to get.

  • error

    Error code.

Return:

Pointer to the utterance processor object of the named key, or NULL if utterance processor of named key is not present in voice.

void SVoiceSetUttProc(SVoice *self, const char *key, SUttProcessor *uttProc, s_erc *error)

Set the value of the named voice utterance processor key to the given SUttProcessor.

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

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance processor object to set.

  • uttProc

    Pointer to the utterance processor of the named key.

  • error

    Error code.

Note:

The voice takes hold of the uttProcSUttProcessor.

void SVoiceDelUttProc(SVoice *self, const char *key, s_erc *error)

Delete the value of the named key from the voice utterance processor container.

The key is removed and value deleted if it is not referenced.

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance processor object to delete.

  • error

    Error code.

Utterance Types

SList *SVoiceGetUttTypesKeys(const SVoice *self, s_erc *error)

Get a list of the voice utterance type keys in the voice.

Parameters:
  • self

    The given voice.

  • error

    Error code.

Return:

SList of keys, or NULL if the utterance type container is empty. The list objects (keys) are string objects and are accessed with SObjectGetString.

Note:

The caller is responsible for the memory of the returned SList object.

s_bool SVoiceUttTypeIsPresent(const SVoice *self, const char *name, s_erc *error)

Query if named utterance type is present in the given voice.

Parameters:
  • self

    The given voice.

  • name

    The utterance type name.

  • error

    Error code.

Return:

TRUE if present or FALSE if not.

const SList *SVoiceGetUttType(const SVoice *self, const char *key, s_erc *error)

Get the voice utterance type object of the named key.

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance type to get.

  • error

    Error code.

Return:

SList of string objects (access with SObjectGetString) of the utterance processors defined for the named utterance type, or NULL if utterance type of named key is not present in voice.

void SVoiceSetUttType(SVoice *self, const char *key, SList *uttType, s_erc *error)

Set the value of the named voice utterance type key to the given SList of string objects of the utterance processors defined for the utterance type.

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

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance type object to set.

  • uttType

    Pointer to the SList of utterance processors for the named utterance type

  • error

    Error code.

Note:

The voice takes hold of the uttTypeSList.

void SVoiceDelUttType(SVoice *self, const char *key, s_erc *error)

Delete the value of the named key from the voice utterance type container.

The key is removed and value deleted if it is not referenced.

Parameters:
  • self

    The given voice.

  • key

    The string key of the utterance type object to delete.

  • error

    Error code.