com.supermap.plugin
Class SpeakPlugin
- java.lang.Object
-
- com.supermap.plugin.SpeakPlugin
-
public class SpeakPlugin extends java.lang.Object
The plug-in class of voice broadcast.Note: when users need to use the voice function, they need to copy the voice folder in the Resource folder in the product package to the assets folder, then the voice resources will be driven into the package.
-
-
Constructor Summary
Constructors Constructor and Description SpeakPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static SpeakPlugin
getInstance()
Gets the plug-in instance of the voice broadcast.int
getSpeakSpeed()
Gets the speed of the current voice broadcast.int
getSpeakVolum()
Gets the quality of the current voice broadcast.boolean
laugchPlugin()
Starts the voice plug-in.boolean
playSound(java.lang.String words)
Broadcast the voice.void
setSpeaker(Speaker speaker)
Set the speaker.void
setSpeakSpeed(int speed)
Set the speed of voice broadcast.void
setSpeakVolum(int volum)
Sets the quality of voice broadcast.boolean
stopPlay()
Stops playing the current contents.boolean
terminatePlugin()
Ends this plug-in.
-
-
-
Method Detail
-
setSpeakSpeed
public void setSpeakSpeed(int speed)
Set the speed of voice broadcast.- Parameters:
speed
- The speed of the voice broadcast is from -32768 to 32768- Default:
- The default value is 0.
-
getSpeakSpeed
public int getSpeakSpeed()
Gets the speed of the current voice broadcast.- Returns:
- The speed of the current voice broadcast.
-
setSpeakVolum
public void setSpeakVolum(int volum)
Sets the quality of voice broadcast.- Parameters:
volum
- The quality of the voice broadcast is from -32768 to 32768.- Default:
- The default value is 32768.
-
getSpeakVolum
public int getSpeakVolum()
Gets the quality of the current voice broadcast.- Returns:
- The quality of the current voice broadcast.
-
setSpeaker
public void setSpeaker(Speaker speaker)
Set the speaker.- Parameters:
speaker
- Speaker
-
getInstance
public static SpeakPlugin getInstance()
Gets the plug-in instance of the voice broadcast.- Returns:
- The plug-in instance of the voice broadcast.
-
laugchPlugin
public boolean laugchPlugin()
Starts the voice plug-in.- Returns:
- A boolean. Return true if successful; otherwise, false.
-
playSound
public boolean playSound(java.lang.String words)
Broadcast the voice.- Parameters:
words
- The words.- Returns:
- A boolean. Return true if successful; otherwise, false.
-
stopPlay
public boolean stopPlay()
Stops playing the current contents.- Returns:
- A boolean. Return true if successful; otherwise, false.
-
terminatePlugin
public boolean terminatePlugin()
Ends this plug-in.- Returns:
- A boolean. Return true if successful; otherwise, false.
-
-