|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extensions of Player to support Text-To-Speech (TTS) coders.
Text-to-speech data may be encoded in Speech API (SAPI) or Telephone Device for the Deaf (TDD) formats.
A TTS dictionary is loaded via the comand loadTTSDictionary().
When initially loaded, it is deactivated, and must be activated by the command activateTTSDictionary() before its rules are used by the player. MDO objects encoded in TDD or SAPI formats have as an additional ESymbol.Container_ContainerInfo information element the language in which the data is written. The player is expected to use this information to determine which of its loaded dictionaries are to be used to play the object.
The Media Data Object containing a TTS text has additional information in its ContainerInfo parameter. The value of ContainerInfo is a Dictionary with the following elements:
Key | Value Type | Description |
Language_Language | Symbol | the language in which the text is to be spoken. One of many languages identified by ESymbol.Language_* |
Language_Variant | Symbol | a few dialects |
Language_SubVariant | Symbol | a few subdialects |
Container_Sentences | Integer | number of sentences in the text |
Container_Duration | Integer | time to play at normal speed in milliseconds |
The Media Data Object containing a TTS dictionary has additional information available via getParameters(). The container parameters include the following elements:
Key | Value Type | Description |
Player_Name | String[] | A string identifying the words/phrases that the dictionary contains. These names are yet to be standardized, but are expected to be formatted as scoped names, like ECTF Symbol names. |
Player_WordList | String[] | The actual words/phrases in the dictionary. This is used for administrative and documentation. The value of Player_Name is a shorthand way to identify this list. |
Player_Size | Integer | A vendor specific heuristic indicating the in-resource space required. |
Language_Language | Symbol[] | The language the dictionary pronounciations are for. |
Language_Variant | Symbol[] | The language dialect(s) the dictionary pronounciations are for. |
Language_SubVariant | Symbol[] | The language subdialect(s) the dictionary pronounciations are for. |
As mentioned above, containers in this format are also used to store TTS dictionaries.
Data encoded according to SAPI consists of ASCII characters with embedded escape sequences which specify volume, speed, pitch, mode (grapheme or phonetic), or emphasis of a particular word or phoneme.
The TTS Player supports at least a minimum subset of the SAPI tags. For details see: SAPI tags for S.410.
Fields inherited from interface javax.telephony.media.ResourceConstants |
e_Disconnected, FOREVER, q_Disconnected, q_RTC, rtcc_Disconnected, rtcc_TriggerRTC, v_Forever |
Fields inherited from interface javax.telephony.media.MediaConstants |
e_OK, q_Duration, q_Standard, q_Stop |
Fields inherited from interface javax.telephony.media.CoderConstants |
v_24kADPCM, v_32kADPCM, v_44kADPCM, v_48k8BitLinear, v_48kALawPCM, v_48kMuLawPCM, v_64k8BitLinear, v_64kALawPCM, v_64kMuLawPCM, v_88k8BitLinear, v_88kALawPCM, v_88kMuLawPCM, v_ADPCM_24k, v_ADPCM_32k, v_ADPCM_44k, v_ADSI, v_ALawPCM_48k, v_ALawPCM_64k, v_ALawPCM_88k, v_ASCII, v_Linear8Bit_48k, v_Linear8Bit_64k, v_Linear8Bit_88k, v_MuLawPCM_48k, v_MuLawPCM_64k, v_MuLawPCM_88k, v_TDD |
Method Summary | |
PlayerEvent |
activateTTSDictionary(java.lang.String[] dictNames,
java.util.Dictionary optargs)
Activates a collection of TTS dictionaries. |
PlayerEvent |
deactivateTTSDictionary(java.lang.String[] dictNames,
java.util.Dictionary optargs)
Deactivates a collection of loaded TTS dictionaries. |
PlayerEvent |
loadTTSDictionary(java.lang.String[] dictNames,
java.util.Dictionary optargs)
Load a collection of TTS dictionaries into a Player. |
PlayerEvent |
unloadTTSDictionary(java.lang.String[] dictNames,
java.util.Dictionary optargs)
Unloads a collection of TTS dictionaries from a Player. |
Methods inherited from interface javax.telephony.media.Player |
adjustPlayerSpeed, adjustPlayerVolume, jumpPlayer, pausePlayer, play, play, resumePlayer, stopPlayer |
Method Detail |
public PlayerEvent loadTTSDictionary(java.lang.String[] dictNames, java.util.Dictionary optargs) throws MediaResourceException
dictNames
- a String[] of DataObject fullNames.optargs
- a Dictionary of optional args.MediaResourceException
- if requested operation fails.public PlayerEvent activateTTSDictionary(java.lang.String[] dictNames, java.util.Dictionary optargs) throws MediaResourceException
dictNames
- a String[] of DataObject fullNames.optargs
- a Dictionary of optional args.MediaResourceException
- if requested operation fails.public PlayerEvent deactivateTTSDictionary(java.lang.String[] dictNames, java.util.Dictionary optargs) throws MediaResourceException
dictNames
- a String[] of DataObject fullNames.optargs
- a Dictionary of optional args.MediaResourceException
- if requested operation fails.public PlayerEvent unloadTTSDictionary(java.lang.String[] dictNames, java.util.Dictionary optargs) throws MediaResourceException
dictNames
- a String[] of DataObject fullNames.optargs
- a Dictionary of optional args.MediaResourceException
- if requested operation fails.
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |