JSR-043: JTAPI-1.4

javax.telephony.media
Interface TTSPlayer

All Superinterfaces:
CoderConstants, MediaConstants, Player, PlayerConstants, Resource, ResourceConstants
All Known Implementing Classes:
BasicMediaService

public interface TTSPlayer
extends Player

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.

Container_CoderType

TTS data is stored in a MDO with parameter Container_CoderType having a value of: or other textual speech encoding.

TTS Dictionary

Some TTS Player Resources (Players that support text-to-speech (TTS) coders) have the ability to customize the pronunciation of text by the use of loadable dictionaries. The dictionaries that may be loaded into such a player resource are selected by the attribute p_LoadedDictionary. Dictionaries loaded in a Player resource are arranged conceptually as a stack. They are loaded and unloaded by the client in FIFO order. When input text is processed by the player, the dictionaries are searched in stack order, top-to-bottom, for pronunciation rules. The number of user dictionaries a player may have loaded simultaneously is determined by the value of the parameter p_DictionaryList. User dictionaries are represented as TVM objects of type Container_SAPI, and contain pronunciation rules, filter directives, and prosody directives. This container format is discussed below.

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 Integernumber of sentences in the text
Container_Duration Integertime 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 TypeDescription
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.

SAPI support

The coder type ESymbol.Container_SAPI is of particular note; this coder is conformant with the raw text format of the Speech API (SAPI) specification [SAPI].

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.

Since:
JTAPI-1.4

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.PlayerConstants
a_Coder, a_DictionaryList, a_Jump, a_LoadedDictionary, a_Pause, a_SapiOptions, a_Speed, a_Volume, e_Busy, ev_ActivateDictionary, ev_AdjustSpeed, ev_AdjustVolume, ev_Jump, ev_LoadDictionary, ev_Marker, ev_Pause, ev_Play, ev_Resume, ev_Speed, ev_Stop, ev_UnloadDictionary, ev_Volume, p_CoderTypes, p_EnabledEvents, p_IfBusy, p_JumpMDO, p_JumpMDOIncrement, p_JumpMSCIncrement, p_JumpSentence, p_JumpTime, p_JumpWord, p_MaxDuration, p_SpeedChange, p_StartPaused, p_VolumeChange, q_Duration, q_EndOfData, rtca_JumpBackwardMDOs, rtca_JumpBackwardMSCs, rtca_JumpBackwardSentences, rtca_JumpBackwardTime, rtca_JumpBackwardWords, rtca_JumpEndMDO, rtca_JumpEndMDOList, rtca_JumpEndMSC, rtca_JumpEndMSCList, rtca_JumpEndSentence, rtca_JumpForwardMDOs, rtca_JumpForwardMSCs, rtca_JumpForwardSentences, rtca_JumpForwardTime, rtca_JumpForwardWords, rtca_JumpStartMDO, rtca_JumpStartMDOList, rtca_JumpStartMSC, rtca_JumpStartMSCList, rtca_JumpStartSentence, rtca_NormalSpeed, rtca_NormalVolume, rtca_Pause, rtca_Resume, rtca_SpeedDown, rtca_SpeedUp, rtca_Stop, rtca_ToggleSpeed, rtca_ToggleVolume, rtca_VolumeDown, rtca_VolumeUp, rtcc_PlayComplete, rtcc_PlayStarted, v_Class, v_Fail, v_Queue, v_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

loadTTSDictionary

public PlayerEvent loadTTSDictionary(java.lang.String[] dictNames,
                                     java.util.Dictionary optargs)
                              throws MediaResourceException
Load a collection of TTS dictionaries into a Player. The dictionary is placed at the top of the dictionary stack, and is deactivated.
Parameters:
dictNames - a String[] of DataObject fullNames.
optargs - a Dictionary of optional args.
Returns:
a PlayerEvent when the operation is complete.
Throws:
MediaResourceException - if requested operation fails.

activateTTSDictionary

public PlayerEvent activateTTSDictionary(java.lang.String[] dictNames,
                                         java.util.Dictionary optargs)
                                  throws MediaResourceException
Activates a collection of TTS dictionaries. The dictionaries must already be loaded.
Parameters:
dictNames - a String[] of DataObject fullNames.
optargs - a Dictionary of optional args.
Returns:
a PlayerEvent when the operation is complete.
Throws:
MediaResourceException - if requested operation fails.

deactivateTTSDictionary

public PlayerEvent deactivateTTSDictionary(java.lang.String[] dictNames,
                                           java.util.Dictionary optargs)
                                    throws MediaResourceException
Deactivates a collection of loaded TTS dictionaries.
Parameters:
dictNames - a String[] of DataObject fullNames.
optargs - a Dictionary of optional args.
Returns:
a PlayerEvent when the operation is complete.
Throws:
MediaResourceException - if requested operation fails.

unloadTTSDictionary

public PlayerEvent unloadTTSDictionary(java.lang.String[] dictNames,
                                       java.util.Dictionary optargs)
                                throws MediaResourceException
Unloads a collection of TTS dictionaries from a Player.
Parameters:
dictNames - a String[] of DataObject fullNames.
optargs - a Dictionary of optional args.
Returns:
a PlayerEvent when the operation is complete.
Throws:
MediaResourceException - if requested operation fails.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org