commit fixing various errors in javadoc file under marytts-client

This commit is contained in:
Aitor Martinez Egurcegui 2015-10-04 12:45:24 +02:00
Родитель 0d3d8a3a40
Коммит 92a67836f5
13 изменённых файлов: 278 добавлений и 94 удалений

Просмотреть файл

@ -55,6 +55,8 @@ public class BatchSynth {
* @param args * @param args
* first argument, the output directory; the rest, file names containing text files. Each text file contains, in * first argument, the output directory; the rest, file names containing text files. Each text file contains, in
* each line, a file name followed by the sentence to generate as a .wav file. * each line, a file name followed by the sentence to generate as a .wav file.
* @throws Exception
* Exception
*/ */
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
File globalOutputDir = new File(args[0]); File globalOutputDir = new File(args[0]);

Просмотреть файл

@ -42,7 +42,7 @@ import marytts.util.http.Address;
* *
* @author Marc Schröder, oytun.turk * @author Marc Schröder, oytun.turk
* @see MaryGUIClient A GUI interface to this client * @see MaryGUIClient A GUI interface to this client
* @see marytts.server.MaryServer Description of the MARY protocol * @link {marytts.server.MaryServer} Description of the MARY protocol
*/ */
public abstract class MaryClient { public abstract class MaryClient {
@ -62,8 +62,7 @@ public abstract class MaryClient {
* address of the server * address of the server
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException * @return getMaryClient(serverAddress, profile, quiet)
* if the host could not be found
*/ */
public static MaryClient getMaryClient(Address serverAddress) throws IOException { public static MaryClient getMaryClient(Address serverAddress) throws IOException {
boolean profile = Boolean.getBoolean("mary.client.profile"); boolean profile = Boolean.getBoolean("mary.client.profile");
@ -97,8 +96,6 @@ public abstract class MaryClient {
* *
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
protected MaryClient() throws IOException { protected MaryClient() throws IOException {
boolean profile = Boolean.getBoolean("mary.client.profile"); boolean profile = Boolean.getBoolean("mary.client.profile");
@ -126,8 +123,6 @@ public abstract class MaryClient {
* the address of the server * the address of the server
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
protected MaryClient(Address serverAddress) throws IOException { protected MaryClient(Address serverAddress) throws IOException {
boolean profile = Boolean.getBoolean("mary.client.profile"); boolean profile = Boolean.getBoolean("mary.client.profile");
@ -154,8 +149,6 @@ public abstract class MaryClient {
* tells the client not to print any of the normal information to stderr * tells the client not to print any of the normal information to stderr
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
protected MaryClient(Address serverAddress, boolean profile, boolean quiet) throws IOException { protected MaryClient(Address serverAddress, boolean profile, boolean quiet) throws IOException {
if (serverAddress != null) { if (serverAddress != null) {
@ -176,8 +169,6 @@ public abstract class MaryClient {
* whether to refrain from printing information to stderr * whether to refrain from printing information to stderr
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
protected final void initialise(boolean profile, boolean quiet) throws IOException { protected final void initialise(boolean profile, boolean quiet) throws IOException {
// This must work for applets too, so no system property queries here: // This must work for applets too, so no system property queries here:
@ -258,7 +249,7 @@ public abstract class MaryClient {
* *
* @return data.audioFileFormatTypes if data.audioFileFormatTypes == null || data.audioOutTypes == null * @return data.audioFileFormatTypes if data.audioFileFormatTypes == null || data.audioOutTypes == null
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
public Vector<String> getAudioFileFormatTypes() throws IOException { public Vector<String> getAudioFileFormatTypes() throws IOException {
if (data.audioFileFormatTypes == null || data.audioOutTypes == null) { if (data.audioFileFormatTypes == null || data.audioOutTypes == null) {
@ -289,8 +280,9 @@ public abstract class MaryClient {
* is optional information which is not required for the normal operation of the client, but may help to avoid * is optional information which is not required for the normal operation of the client, but may help to avoid
* incompatibilities. * incompatibilities.
* *
* @throws Exception * @throws IOException
* if communication with the server fails * if communication with the server fails
* @return data.allDataTypes
*/ */
public Vector<MaryClient.DataType> getAllDataTypes() throws IOException { public Vector<MaryClient.DataType> getAllDataTypes() throws IOException {
if (data.allDataTypes == null) if (data.allDataTypes == null)
@ -307,7 +299,7 @@ public abstract class MaryClient {
* incompatibilities. * incompatibilities.
* *
* @return a Vector of MaryHttpClient.DataType objects. * @return a Vector of MaryHttpClient.DataType objects.
* @throws Exception * @throws IOException
* if communication with the server fails * if communication with the server fails
*/ */
public Vector<MaryClient.DataType> getInputDataTypes() throws IOException { public Vector<MaryClient.DataType> getInputDataTypes() throws IOException {
@ -327,8 +319,6 @@ public abstract class MaryClient {
* @return a Vector of MaryHttpClient.DataType objects. * @return a Vector of MaryHttpClient.DataType objects.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public Vector<MaryClient.DataType> getOutputDataTypes() throws IOException { public Vector<MaryClient.DataType> getOutputDataTypes() throws IOException {
if (data.outputDataTypes == null) if (data.outputDataTypes == null)
@ -348,8 +338,6 @@ public abstract class MaryClient {
* @return a Vector of MaryHttpClient.Voice objects. * @return a Vector of MaryHttpClient.Voice objects.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public Vector<MaryClient.Voice> getVoices() throws IOException { public Vector<MaryClient.Voice> getVoices() throws IOException {
if (data.allVoices == null) if (data.allVoices == null)
@ -370,8 +358,6 @@ public abstract class MaryClient {
* @return a Vector of MaryHttpClient.Voice objects, or null if no voices exist for that locale. * @return a Vector of MaryHttpClient.Voice objects, or null if no voices exist for that locale.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public Vector<MaryClient.Voice> getVoices(Locale locale) throws IOException { public Vector<MaryClient.Voice> getVoices(Locale locale) throws IOException {
if (data.allVoices == null) if (data.allVoices == null)
@ -388,8 +374,6 @@ public abstract class MaryClient {
* @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist. * @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public Vector<MaryClient.Voice> getGeneralDomainVoices() throws IOException { public Vector<MaryClient.Voice> getGeneralDomainVoices() throws IOException {
Vector<MaryClient.Voice> voices = getVoices(); Vector<MaryClient.Voice> voices = getVoices();
@ -412,7 +396,7 @@ public abstract class MaryClient {
* incompatibilities. * incompatibilities.
* *
* @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist. * @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist.
* @throws Exception * @throws IOException
* if communication with the server fails * if communication with the server fails
*/ */
public Vector<MaryClient.Voice> getLimitedDomainVoices() throws IOException { public Vector<MaryClient.Voice> getLimitedDomainVoices() throws IOException {
@ -438,7 +422,7 @@ public abstract class MaryClient {
* @param locale * @param locale
* the requested voice locale * the requested voice locale
* @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist. * @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist.
* @throws Exception * @throws IOException
* if communication with the server fails * if communication with the server fails
*/ */
public Vector<MaryClient.Voice> getGeneralDomainVoices(Locale locale) throws IOException { public Vector<MaryClient.Voice> getGeneralDomainVoices(Locale locale) throws IOException {
@ -464,7 +448,7 @@ public abstract class MaryClient {
* @param locale * @param locale
* the requested voice locale * the requested voice locale
* @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist. * @return a Vector of MaryHttpClient.Voice objects, or null if no such voices exist.
* @throws Exception * @throws IOException
* if communication with the server fails * if communication with the server fails
*/ */
public Vector<MaryClient.Voice> getLimitedDomainVoices(Locale locale) throws IOException { public Vector<MaryClient.Voice> getLimitedDomainVoices(Locale locale) throws IOException {
@ -499,7 +483,7 @@ public abstract class MaryClient {
* the voice * the voice
* @return the example text * @return the example text
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
public Vector<String> getVoiceExampleTextsLimitedDomain(String voicename) throws IOException { public Vector<String> getVoiceExampleTextsLimitedDomain(String voicename) throws IOException {
if (!data.voiceExampleTextsLimitedDomain.containsKey(voicename)) { if (!data.voiceExampleTextsLimitedDomain.containsKey(voicename)) {
@ -517,10 +501,10 @@ public abstract class MaryClient {
* the string representation of the data type, e.g. "RAWMARYXML". This is optional information which is not * the string representation of the data type, e.g. "RAWMARYXML". This is optional information which is not
* required for the normal operation of the client, but may help to avoid incompatibilities. * required for the normal operation of the client, but may help to avoid incompatibilities.
* @return the example text, or null if none could be obtained. * @return the example text, or null if none could be obtained.
* @param locale
* locale
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public String getServerExampleText(String dataType, String locale) throws IOException { public String getServerExampleText(String dataType, String locale) throws IOException {
if (!data.serverExampleTexts.containsKey(dataType + " " + locale)) { if (!data.serverExampleTexts.containsKey(dataType + " " + locale)) {
@ -540,7 +524,7 @@ public abstract class MaryClient {
* *
* @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)" * @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)"
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
protected abstract String getDefaultAudioEffects() throws IOException; protected abstract String getDefaultAudioEffects() throws IOException;
@ -583,20 +567,24 @@ public abstract class MaryClient {
* a textual representation of the input data * a textual representation of the input data
* @param inputType * @param inputType
* the name of the input data type, e.g. TEXT or RAWMARYXML. * the name of the input data type, e.g. TEXT or RAWMARYXML.
* @param locale
* locale
* @param audioType * @param audioType
* the name of the audio format, e.g. "WAVE" or "MP3". * the name of the audio format, e.g. "WAVE" or "MP3".
* @param defaultVoiceName * @param defaultVoiceName
* the name of the voice to use, e.g. de7 or us1. * the name of the voice to use, e.g. de7 or us1.
* @param defaultStyle
* defaultStyle
* @param defaultEffects
* defaultEffects
* @param audioPlayer * @param audioPlayer
* the FreeTTS audio player with which to play the synthesised audio data. The given audio player must already be * the FreeTTS audio player with which to play the synthesized audio data. The given audio player must already be
* instanciated. See the package <code>com.sun.speech.freetts.audio</code> in FreeTTS for implementations of * instantiated. See the package <code>com.sun.speech.freetts.audio</code> in FreeTTS for implementations of
* AudioPlayer. * AudioPlayer.
* @param listener * @param listener
* a means for letting calling code know that the AudioPlayer has finished. * a means for letting calling code know that the AudioPlayer has finished.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
* @see #getInputDataTypes() * @see #getInputDataTypes()
* @see #getVoices() * @see #getVoices()
*/ */
@ -621,11 +609,11 @@ public abstract class MaryClient {
* @param defaultVoiceName * @param defaultVoiceName
* the name of the voice to use, e.g. de7 or us1. * the name of the voice to use, e.g. de7 or us1.
* @param locale * @param locale
* * locale
* @param defaultStyle * @param defaultStyle
* * defaultStyle
* @param defaultEffects * @param defaultEffects
* * defaultEffects
* @param outputTypeParams * @param outputTypeParams
* any additional parameters, e.g. for output type TARGETFEATURES, the space-separated list of features to produce. * any additional parameters, e.g. for output type TARGETFEATURES, the space-separated list of features to produce.
* Can be null. * Can be null.
@ -633,8 +621,6 @@ public abstract class MaryClient {
* the output stream into which the data from the server is to be written. * the output stream into which the data from the server is to be written.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
* @see #getInputDataTypes() * @see #getInputDataTypes()
* @see #getOutputDataTypes() * @see #getOutputDataTypes()
* @see #getVoices() * @see #getVoices()
@ -665,23 +651,21 @@ public abstract class MaryClient {
* @param defaultVoiceName * @param defaultVoiceName
* the name of the voice to use, e.g. de7 or us1. * the name of the voice to use, e.g. de7 or us1.
* @param locale * @param locale
* * locale
* @param defaultStyle * @param defaultStyle
* * defaultStyle
* @param defaultEffects * @param defaultEffects
* * defaultEffects
* @param outputTypeParams * @param outputTypeParams
* any additional parameters, e.g. for output type TARGETFEATURES, the space-separated list of features to produce. * any additional parameters, e.g. for output type TARGETFEATURES, the space-separated list of features to produce.
* Can be null. * Can be null.
* @param output * @param output
* the output stream into which the data from the server is to be written. * the output stream into which the data from the server is to be written.
* @param timeout * @param timeout
* if >0, sets a timer to as many milliseconds; if processing is not finished by then, the connection with the Mary * if &gt;0, sets a timer to as many milliseconds; if processing is not finished by then, the connection with the
* server is forcefully cut, resulting in an IOException. * Mary server is forcefully cut, resulting in an IOException.
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
* @see #getInputDataTypes() * @see #getInputDataTypes()
* @see #getOutputDataTypes() * @see #getOutputDataTypes()
* @see #getVoices() * @see #getVoices()
@ -706,6 +690,8 @@ public abstract class MaryClient {
* Return an audio file format type for the given string. In addition to the built-in types, this can deal with MP3 supported * Return an audio file format type for the given string. In addition to the built-in types, this can deal with MP3 supported
* by tritonus. * by tritonus.
* *
* @param name
* name
* @return the audio file format type if it is known, or null. * @return the audio file format type if it is known, or null.
*/ */
public static AudioFileFormat.Type getAudioFileFormatType(String name) { public static AudioFileFormat.Type getAudioFileFormatType(String name) {

Просмотреть файл

@ -161,8 +161,8 @@ public class MaryGUIClient extends JPanel {
* Create a MaryGUIClient instance that connects to the server host and port as specified in the system properties * Create a MaryGUIClient instance that connects to the server host and port as specified in the system properties
* "server.host" and "server.port", which default to "cling.dfki.uni-sb.de" and 59125, respectively. * "server.host" and "server.port", which default to "cling.dfki.uni-sb.de" and 59125, respectively.
* *
* @throws IOException * @throws Exception
* @throws UnknownHostException * Exception
*/ */
public MaryGUIClient() throws Exception { public MaryGUIClient() throws Exception {
super(); super();
@ -184,9 +184,11 @@ public class MaryGUIClient extends JPanel {
* Create a MaryGUIClient instance that connects to the given server host and port. This is meant to be used from Applets. * Create a MaryGUIClient instance that connects to the given server host and port. This is meant to be used from Applets.
* *
* @param hostAddress * @param hostAddress
* hostAddress
* @param applet * @param applet
* applet
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
public MaryGUIClient(Address hostAddress, JApplet applet) throws IOException { public MaryGUIClient(Address hostAddress, JApplet applet) throws IOException {
super(); super();
@ -208,9 +210,8 @@ public class MaryGUIClient extends JPanel {
/** /**
* Create an instance of the MaryHttpClient class which does the processing, and initialise the GUI. * Create an instance of the MaryHttpClient class which does the processing, and initialise the GUI.
* *
* @throws InterruptedException
* @throws IOException * @throws IOException
* @throws Exception * IOException
*/ */
public void init() throws IOException { public void init() throws IOException {
maryGUITraversal = new MaryGUIFocusTraversalPolicy(); maryGUITraversal = new MaryGUIFocusTraversalPolicy();
@ -849,8 +850,8 @@ public class MaryGUIClient extends JPanel {
/** /**
* Verify that the list of voices in cbDefaultVoices matches the language of the input format. * Verify that the list of voices in cbDefaultVoices matches the language of the input format.
* *
* @throws InterruptedException
* @throws IOException * @throws IOException
* IOException
*/ */
private void verifyDefaultVoices() throws IOException { private void verifyDefaultVoices() throws IOException {
MaryClient.DataType inputType = (MaryClient.DataType) cbInputType.getSelectedItem(); MaryClient.DataType inputType = (MaryClient.DataType) cbInputType.getSelectedItem();
@ -1010,6 +1011,9 @@ public class MaryGUIClient extends JPanel {
/** /**
* Set everything that is not between < and > to bold. This is "dumb", i.e. it will not try to analyse the contents of tags, * Set everything that is not between < and > to bold. This is "dumb", i.e. it will not try to analyse the contents of tags,
* and fail at situations like <tag attr="3>i<4">, where i would be printed in bold as well. * and fail at situations like <tag attr="3>i<4">, where i would be printed in bold as well.
*
* @param doc
* doc
*/ */
private void highlightText(StyledDocument doc) { private void highlightText(StyledDocument doc) {
SimpleAttributeSet highlighted = new SimpleAttributeSet(); SimpleAttributeSet highlighted = new SimpleAttributeSet();

Просмотреть файл

@ -51,7 +51,7 @@ import marytts.util.string.StringUtils;
* *
* @author Marc Schr&ouml;der * @author Marc Schr&ouml;der
* @see MaryGUIClient A GUI interface to this client * @see MaryGUIClient A GUI interface to this client
* @see marytts.server.MaryServer Description of the MARY protocol * @link {marytts.server.MaryServer} Description of the MARY protocol
*/ */
public class MarySocketClient extends MaryClient { public class MarySocketClient extends MaryClient {
@ -62,8 +62,6 @@ public class MarySocketClient extends MaryClient {
* *
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MarySocketClient() throws IOException { public MarySocketClient() throws IOException {
super(); super();
@ -81,8 +79,6 @@ public class MarySocketClient extends MaryClient {
* the address of the server * the address of the server
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MarySocketClient(Address serverAddress) throws IOException { public MarySocketClient(Address serverAddress) throws IOException {
super(serverAddress); super(serverAddress);
@ -101,8 +97,6 @@ public class MarySocketClient extends MaryClient {
* tells the client not to print any of the normal information to stderr * tells the client not to print any of the normal information to stderr
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MarySocketClient(Address serverAddress, boolean profile, boolean quiet) throws IOException { public MarySocketClient(Address serverAddress, boolean profile, boolean quiet) throws IOException {
super(serverAddress, profile, quiet); super(serverAddress, profile, quiet);
@ -319,8 +313,6 @@ public class MarySocketClient extends MaryClient {
* From an open server connection, read one chunk of info data. Writes the infoCommand to the server, then reads from the * From an open server connection, read one chunk of info data. Writes the infoCommand to the server, then reads from the
* server until an empty line or eof is read. * server until an empty line or eof is read.
* *
* @param toServer
* @param fromServer
* @param infoCommand * @param infoCommand
* the one-line request to send to the server * the one-line request to send to the server
* @return a string representing the server response, lines being separated by a '\n' character. * @return a string representing the server response, lines being separated by a '\n' character.
@ -426,7 +418,7 @@ public class MarySocketClient extends MaryClient {
* *
* @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)" * @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)"
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
@Override @Override
protected String getDefaultAudioEffects() throws IOException { protected String getDefaultAudioEffects() throws IOException {

Просмотреть файл

@ -54,7 +54,7 @@ import marytts.util.string.StringUtils;
* *
* @author Marc Schr&ouml;der, oytun.turk * @author Marc Schr&ouml;der, oytun.turk
* @see MaryGUIClient A GUI interface to this client * @see MaryGUIClient A GUI interface to this client
* @see marytts.server.MaryServer Description of the MARY protocol * @link {marytts.server.MaryServer} Description of the MARY protocol.
*/ */
public class MaryHttpClient extends MaryClient { public class MaryHttpClient extends MaryClient {
@ -65,8 +65,6 @@ public class MaryHttpClient extends MaryClient {
* *
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MaryHttpClient() throws IOException { public MaryHttpClient() throws IOException {
super(); super();
@ -88,8 +86,6 @@ public class MaryHttpClient extends MaryClient {
* the address of the server * the address of the server
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MaryHttpClient(Address serverAddress) throws IOException { public MaryHttpClient(Address serverAddress) throws IOException {
super(serverAddress); super(serverAddress);
@ -108,8 +104,6 @@ public class MaryHttpClient extends MaryClient {
* tells the client not to print any of the normal information to stderr * tells the client not to print any of the normal information to stderr
* @throws IOException * @throws IOException
* if communication with the server fails * if communication with the server fails
* @throws UnknownHostException
* if the host could not be found
*/ */
public MaryHttpClient(Address serverAddress, boolean profile, boolean quiet) throws IOException { public MaryHttpClient(Address serverAddress, boolean profile, boolean quiet) throws IOException {
super(serverAddress, profile, quiet); super(serverAddress, profile, quiet);
@ -190,7 +184,7 @@ public class MaryHttpClient extends MaryClient {
* *
* @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)" * @return A string of available audio effects and default parameters, i.e. "FIRFilter,Robot(amount=50)"
* @throws IOException * @throws IOException
* @throws UnknownHostException * IOException
*/ */
@Override @Override
protected String getDefaultAudioEffects() throws IOException { protected String getDefaultAudioEffects() throws IOException {

Просмотреть файл

@ -49,13 +49,39 @@ public class AsynchronousThreadedMaryClient extends Thread {
private AudioInputStream latestAudio = null; private AudioInputStream latestAudio = null;
private boolean exitRequested = false; private boolean exitRequested = false;
/** Creates new AsynchronousThreadedMaryClient */ /**
* Creates new AsynchronousThreadedMaryClient
*
* @param emoSpeak
* emoSpeak
* @throws IOException
* IOException
* @throws UnknownHostException
* UnknownHostException
*/
public AsynchronousThreadedMaryClient(AudioFileReceiver emoSpeak) throws IOException, UnknownHostException { public AsynchronousThreadedMaryClient(AudioFileReceiver emoSpeak) throws IOException, UnknownHostException {
this.emoSpeak = emoSpeak; this.emoSpeak = emoSpeak;
processor = MaryClient.getMaryClient(); processor = MaryClient.getMaryClient();
} }
/** Constructor to be used by applets */ /**
* Constructor to be used by applets
*
* @param emoSpeak
* emoSpeak
* @param serverHost
* serverHost
* @param serverPort
* serverPort
* @param printProfilingInfo
* printProfilingInfo
* @param beQuiet
* beQuiet
* @throws IOException
* IOException
* @throws UnknownHostException
* UnknownHostException
*/
public AsynchronousThreadedMaryClient(AudioFileReceiver emoSpeak, String serverHost, int serverPort, public AsynchronousThreadedMaryClient(AudioFileReceiver emoSpeak, String serverHost, int serverPort,
boolean printProfilingInfo, boolean beQuiet) throws IOException, UnknownHostException { boolean printProfilingInfo, boolean beQuiet) throws IOException, UnknownHostException {
this.emoSpeak = emoSpeak; this.emoSpeak = emoSpeak;

Просмотреть файл

@ -27,7 +27,12 @@ import java.net.UnknownHostException;
* @author Marc Schr&ouml;der * @author Marc Schr&ouml;der
*/ */
public class EmoSpeak extends javax.swing.JFrame { public class EmoSpeak extends javax.swing.JFrame {
/** Creates new form EmoSpeak */ /**
* Creates new form EmoSpeak
*
* @throws Exception
* Exception
*/
public EmoSpeak() throws Exception { public EmoSpeak() throws Exception {
super("OpenMary EmoSpeak"); super("OpenMary EmoSpeak");
initComponents(); initComponents();
@ -36,6 +41,11 @@ public class EmoSpeak extends javax.swing.JFrame {
/** /**
* This method is called from within the constructor to initialize the form. * This method is called from within the constructor to initialize the form.
*
* @throws IOException
* IOException
* @throws UnknownHostException
* UnknownHostException
*/ */
private void initComponents() throws IOException, UnknownHostException { private void initComponents() throws IOException, UnknownHostException {
emoSpeakPanel1 = new EmoSpeakPanel(true, System.getProperty("server.host", "cling.dfki.uni-sb.de"), Integer.getInteger( emoSpeakPanel1 = new EmoSpeakPanel(true, System.getProperty("server.host", "cling.dfki.uni-sb.de"), Integer.getInteger(
@ -57,7 +67,12 @@ public class EmoSpeak extends javax.swing.JFrame {
setLocation((screenSize.width - 550) / 2, (screenSize.height - 630) / 2); setLocation((screenSize.width - 550) / 2, (screenSize.height - 630) / 2);
} }
/** Exit the Application */ /**
* Exit the Application
*
* @param evt
* evt
*/
private void exitForm(java.awt.event.WindowEvent evt) { private void exitForm(java.awt.event.WindowEvent evt) {
emoSpeakPanel1.requestExit(); emoSpeakPanel1.requestExit();
System.exit(0); System.exit(0);
@ -66,6 +81,8 @@ public class EmoSpeak extends javax.swing.JFrame {
/** /**
* @param args * @param args
* the command line arguments * the command line arguments
* @throws Exception
* Exception
*/ */
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
new EmoSpeak().setVisible(true); new EmoSpeak().setVisible(true);

Просмотреть файл

@ -69,7 +69,20 @@ public class EmoSpeakPanel extends javax.swing.JPanel implements AudioFileReceiv
private Map sampleTextsByLocale; // map locale to Vectors of Strings private Map sampleTextsByLocale; // map locale to Vectors of Strings
private Map localeByDisplayLanguage; // map display language to locale private Map localeByDisplayLanguage; // map display language to locale
/** Creates new form EmoSpeakPanel */ /**
* Creates new form EmoSpeakPanel
*
* @param synthesiseAsynchronously
* synthesiseAsynchronously
* @param maryServerHost
* maryServerHost
* @param maryServerPort
* maryServerPort
* @throws IOException
* IOException
* @throws UnknownHostException
* UnknownHostException
*/
public EmoSpeakPanel(boolean synthesiseAsynchronously, String maryServerHost, int maryServerPort) throws IOException, public EmoSpeakPanel(boolean synthesiseAsynchronously, String maryServerHost, int maryServerPort) throws IOException,
UnknownHostException { UnknownHostException {
this.synthesiseAsynchronously = synthesiseAsynchronously; this.synthesiseAsynchronously = synthesiseAsynchronously;

Просмотреть файл

@ -52,7 +52,16 @@ public class EmoTransformer extends Thread {
private boolean exitRequested = false; private boolean exitRequested = false;
/** Creates new EmoTransformer */ /**
* Creates new EmoTransformer
*
* @param emoSpeak
* emoSpeak
* @throws TransformerConfigurationException
* TransformerConfigurationException
* @throws ParserConfigurationException
* ParserConfigurationException
*/
public EmoTransformer(ProsodyXMLDisplayer emoSpeak) throws TransformerConfigurationException, ParserConfigurationException { public EmoTransformer(ProsodyXMLDisplayer emoSpeak) throws TransformerConfigurationException, ParserConfigurationException {
this.emoSpeak = emoSpeak; this.emoSpeak = emoSpeak;
// Try to find a suitable XSLT transformer // Try to find a suitable XSLT transformer
@ -78,6 +87,19 @@ public class EmoTransformer extends Thread {
/** /**
* Asynchronously set the latest emotion values. Overwrites any previous, unprocessed data. * Asynchronously set the latest emotion values. Overwrites any previous, unprocessed data.
*
* @param activation
* activation
* @param evaluation
* evaluation
* @param power
* power
* @param text
* text
* @param locale
* locale
* @param r
* r
*/ */
public synchronized void setEmotionValues(int activation, int evaluation, int power, String text, Locale locale, int r) { public synchronized void setEmotionValues(int activation, int evaluation, int power, String text, Locale locale, int r) {
this.activation = activation; this.activation = activation;

Просмотреть файл

@ -52,7 +52,14 @@ public class JFeeltraceCircle extends javax.swing.JPanel {
return requestedSize; return requestedSize;
} }
/** Creates new form JFeeltraceCircle */ /**
* Creates new form JFeeltraceCircle
*
* @param isCircular
* isCircular
* @param requestedSize
* requestedSize
*/
public JFeeltraceCircle(boolean isCircular, java.awt.Dimension requestedSize) { public JFeeltraceCircle(boolean isCircular, java.awt.Dimension requestedSize) {
this.isCircular = isCircular; this.isCircular = isCircular;
this.requestedSize = requestedSize; this.requestedSize = requestedSize;
@ -155,6 +162,9 @@ public class JFeeltraceCircle extends javax.swing.JPanel {
/** /**
* Define the location of the cursor; the actual drawing is done in paintComponents(). * Define the location of the cursor; the actual drawing is done in paintComponents().
*
* @param p
* p
*/ */
private void setFeeltraceCursor(java.awt.Point p) { private void setFeeltraceCursor(java.awt.Point p) {
java.awt.Point newLocation; java.awt.Point newLocation;

Просмотреть файл

@ -50,7 +50,12 @@ public class JFeeltracePanel extends JPanel {
return powerModel; return powerModel;
} }
/** Creates new form JFeeltracePanel */ /**
* Creates new form JFeeltracePanel
*
* @param showPower
* showPower
*/
public JFeeltracePanel(boolean showPower) { public JFeeltracePanel(boolean showPower) {
this.showPower = showPower; this.showPower = showPower;
initComponents(); initComponents();

Просмотреть файл

@ -40,7 +40,22 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
this(0, 0, 0, 0, 0, 0); this(0, 0, 0, 0, 0, 0);
} }
/** Creates new RectangularTwoDimensionalModel */ /**
* Creates new RectangularTwoDimensionalModel
*
* @param x
* x
* @param y
* y
* @param minX
* minX
* @param maxX
* maxX
* @param minY
* minY
* @param maxY
* maxY
*/
public RectangularTwoDimensionalModel(int x, int y, int minX, int maxX, int minY, int maxY) { public RectangularTwoDimensionalModel(int x, int y, int minX, int maxX, int minY, int maxY) {
this.x = x; this.x = x;
this.y = y; this.y = y;
@ -50,13 +65,23 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
this.maxY = maxY; this.maxY = maxY;
} }
/** Adds a ChangeListener to the model's listener list. */ /**
* Adds a ChangeListener to the model's listener list.
*
* @param l
* l
*/
public void addChangeListener(javax.swing.event.ChangeListener l) { public void addChangeListener(javax.swing.event.ChangeListener l) {
if (!changeListeners.contains(l)) if (!changeListeners.contains(l))
changeListeners.add(l); changeListeners.add(l);
} }
/** Removes a ChangeListener from the model's listener list. */ /**
* Removes a ChangeListener from the model's listener list.
*
* @param l
* l
*/
public void removeChangeListener(javax.swing.event.ChangeListener l) { public void removeChangeListener(javax.swing.event.ChangeListener l) {
changeListeners.remove(l); changeListeners.remove(l);
} }
@ -70,28 +95,51 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
} }
} }
/** Set the Maximum X value. */ /**
* Set the Maximum X value.
*
* @param maxX
* maxX
*/
public void setMaxX(int maxX) { public void setMaxX(int maxX) {
this.maxX = maxX; this.maxX = maxX;
} }
/** Set the Maximum Y value. */ /**
* Set the Maximum Y value.
*
* @param maxY
* maxY
*/
public void setMaxY(int maxY) { public void setMaxY(int maxY) {
this.maxY = maxY; this.maxY = maxY;
} }
/** Set the Minimum X value. */ /**
* Set the Minimum X value.
*
* @param minX
* minX
*/
public void setMinX(int minX) { public void setMinX(int minX) {
this.minX = minX; this.minX = minX;
} }
/** Set the Minimum Y value. */ /**
* Set the Minimum Y value.
*
* @param minY
* minY
*/
public void setMinY(int minY) { public void setMinY(int minY) {
this.minY = minY; this.minY = minY;
} }
/** /**
* Set X value. If beyond the Max and Min range, value is ignored. * Set X value. If beyond the Max and Min range, value is ignored.
*
* @param x
* x
*/ */
public void setX(int x) { public void setX(int x) {
if (minX <= x && x <= maxX) { if (minX <= x && x <= maxX) {
@ -102,6 +150,11 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
/** /**
* Jointly set x and y values. If one of the values is beyond the respective Max and Min range, both values are ignored. * Jointly set x and y values. If one of the values is beyond the respective Max and Min range, both values are ignored.
*
* @param x
* x
* @param y
* y
*/ */
public void setXY(int x, int y) { public void setXY(int x, int y) {
if (minX <= x && x <= maxX && minY <= y && y <= maxY) { if (minX <= x && x <= maxX && minY <= y && y <= maxY) {
@ -113,6 +166,9 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
/** /**
* Set Y value. If beyond the Max and Min range, value is ignored. * Set Y value. If beyond the Max and Min range, value is ignored.
*
* @param y
* y
*/ */
public void setY(int y) { public void setY(int y) {
if (minY <= y && y <= maxY) { if (minY <= y && y <= maxY) {
@ -121,12 +177,20 @@ public class RectangularTwoDimensionalModel implements TwoDimensionalModel {
} }
} }
/** Get the X value. */ /**
* Get the X value.
*
* @param return x
*/
public int getX() { public int getX() {
return x; return x;
} }
/** Get the Y value. */ /**
* Get the Y value.
*
* @param return y
*/
public int getY() { public int getY() {
return y; return y;
} }

Просмотреть файл

@ -26,35 +26,74 @@ package marytts.tools.emospeak;
public interface TwoDimensionalModel { public interface TwoDimensionalModel {
/** /**
* Jointly set x and y values. If one of the values is beyond the respective Max and Min range, both values are ignored. * Jointly set x and y values. If one of the values is beyond the respective Max and Min range, both values are ignored.
*
* @param x
* x
* @param y
* y
*/ */
public void setXY(int x, int y); public void setXY(int x, int y);
/** /**
* Set X value. If beyond the Max and Min range, value is ignored. * Set X value. If beyond the Max and Min range, value is ignored.
*
* @param x
* x
*/ */
public void setX(int x); public void setX(int x);
/** /**
* Set Y value. If beyond the Max and Min range, value is ignored. * Set Y value. If beyond the Max and Min range, value is ignored.
*
* @param y
* y
*/ */
public void setY(int y); public void setY(int y);
/** Set the Maximum X value. */ /**
* Set the Maximum X value.
*
* @param maxX
* maxX
*/
public void setMaxX(int maxX); public void setMaxX(int maxX);
/** Set the Minimum X value. */ /**
* Set the Minimum X value.
*
* @param minX
* minX
*/
public void setMinX(int minX); public void setMinX(int minX);
/** Set the Maximum Y value. */ /**
* Set the Maximum Y value.
*
* @param maxY
* maxY
*/
public void setMaxY(int maxY); public void setMaxY(int maxY);
/** Set the Minimum Y value. */ /**
* Set the Minimum Y value.
*
* @param minY
* minY
*/
public void setMinY(int minY); public void setMinY(int minY);
/** Get the X value. */ /**
* Get the X value.
*
* @return x
*/
public int getX(); public int getX();
/** Get the Y value. */ /**
* Get the Y value.
*
* @return Y
*/
public int getY(); public int getY();
public int getMaxX(); public int getMaxX();
@ -65,9 +104,19 @@ public interface TwoDimensionalModel {
public int getMinY(); public int getMinY();
/** Adds a ChangeListener to the model's listener list. */ /**
* Adds a ChangeListener to the model's listener list.
*
* @param l
* l
*/
public void addChangeListener(javax.swing.event.ChangeListener l); public void addChangeListener(javax.swing.event.ChangeListener l);
/** Removes a ChangeListener from the model's listener list. */ /**
* Removes a ChangeListener from the model's listener list.
*
* @param l
* l
*/
public void removeChangeListener(javax.swing.event.ChangeListener l); public void removeChangeListener(javax.swing.event.ChangeListener l);
} }