Class DefaultSpeechOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.DefaultSpeechOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class DefaultSpeechOptions extends Optionable
Default sonification options for all speech tracks.If specific options are also set on individual tracks or per series, those will override these options.
- Since:
- 11.2.0.0
- Author:
- Jamson Chan
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description DefaultSpeechOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActiveWhengetActiveWhen()Returns the ActiveWhen object.StringgetLanguage()Returns the language to speak in for speech tracks, as an IETF BCP 47 language tag.MappinggetMapping()Returns the Mapping object.PointGroupinggetPointGrouping()Returns the options for point grouping, specifically for instrument tracks.StringgetPreferredVoice()Returns the name of the voice synthesis to prefer for speech tracks.StringgetType()Returns the type of track.booleanisShowPlayMarker()Returns whether to show play marker (tooltip and/or crosshair) for a track.voidsetActiveWhen(ActiveWhen activeWhen)Sets the ActiveWhen object.voidsetLanguage(String language)Sets the language to speak in for speech tracks, as an IETF BCP 47 language tag.voidsetMapping(Mapping mapping)Sets the Mapping object.voidsetPointGrouping(PointGrouping pointGrouping)Sets the options for point grouping, specifically for instrument tracks.voidsetPreferredVoice(String preferredVoice)Sets the name of the voice synthesis to prefer for speech tracks.voidsetShowPlayMarker(Boolean showPlayMarker)Sets whether to show play marker (tooltip and/or crosshair) for a track.voidsetType(String type)Sets the type of track.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
getActiveWhen
public ActiveWhen getActiveWhen()
Returns the ActiveWhen object.Define a condition for when a track should be active and not.
Can either be a function callback or a configuration object.
If a function is used, it should return a
booleanfor whether or not the track should be active. The function is called for each audio event, and receives a parameter object withtime, and potentiallypointandvalueproperties depending on the track.pointis available if the audio event is related to a data point.valueis available if the track is used as a context track, andvalueIntervalis used.
-
setActiveWhen
public void setActiveWhen(ActiveWhen activeWhen)
Sets the ActiveWhen object.Define a condition for when a track should be active and not.
Can either be a function callback or a configuration object.
If a function is used, it should return a
booleanfor whether or not the track should be active. The function is called for each audio event, and receives a parameter object withtime, and potentiallypointandvalueproperties depending on the track.pointis available if the audio event is related to a data point.valueis available if the track is used as a context track, andvalueIntervalis used.
-
getLanguage
public String getLanguage()
Returns the language to speak in for speech tracks, as an IETF BCP 47 language tag.Default:
"en-US"
-
setLanguage
public void setLanguage(String language)
Sets the language to speak in for speech tracks, as an IETF BCP 47 language tag.
-
getMapping
public Mapping getMapping()
Returns the Mapping object.Mapping options for the audio parameters.
All parameters can be either:
- A string, referencing a point property to map to.
- A number, setting the value of the audio parameter directly.
- A callback function, returning the value programmatically.
- An object defining detailed configuration of the mapping.
-
setMapping
public void setMapping(Mapping mapping)
Sets the Mapping object.Mapping options for the audio parameters.
All parameters can be either:
- A string, referencing a point property to map to.
- A number, setting the value of the audio parameter directly.
- A callback function, returning the value programmatically.
- An object defining detailed configuration of the mapping.
-
getPointGrouping
public PointGrouping getPointGrouping()
Returns the options for point grouping, specifically for instrument tracks.
-
setPointGrouping
public void setPointGrouping(PointGrouping pointGrouping)
Sets the options for point grouping, specifically for instrument tracks.
-
getPreferredVoice
public String getPreferredVoice()
Returns the name of the voice synthesis to prefer for speech tracks.If not available, falls back to the default voice for the selected language.
Different platforms provide different voices for web speech synthesis.
Default:
null
-
setPreferredVoice
public void setPreferredVoice(String preferredVoice)
Sets the name of the voice synthesis to prefer for speech tracks.If not available, falls back to the default voice for the selected language.
Different platforms provide different voices for web speech synthesis.
-
isShowPlayMarker
public boolean isShowPlayMarker()
Returns whether to show play marker (tooltip and/or crosshair) for a track.Default:
true
-
setShowPlayMarker
public void setShowPlayMarker(Boolean showPlayMarker)
Sets whether to show play marker (tooltip and/or crosshair) for a track.
-
getType
public String getType()
Returns the type of track. Always"instrument"for instrument tracks, and "speech" forspeechtracks.Default:
"speech"
-
setType
public void setType(String type)
Sets the type of track. Always"instrument"for instrument tracks, and "speech" forspeechtracks.
-
-