com.iSpeech
Class iSpeechSynthesis

java.lang.Object
  extended by com.iSpeech.iSpeechSynthesis

public class iSpeechSynthesis
extends java.lang.Object

Contains methods used to synthesize speech from text. You can get a reference of this class by calling SpeechSynthesis.getInstance. An API key is required to use this class. You may obtain a free key from the following URL: {http://www.ispeech.org/}


Field Summary
static java.lang.String version
           
 
Method Summary
 void clearMetaAndOptionalCommands()
          Clears any associated meta and optional parameters.
static iSpeechSynthesis getInstance(java.lang.String apiKey, boolean production)
          Gets an instance of the iSpeech Speech Synthesis class.
 void setOptionalCommand(java.lang.String command, java.lang.String parameter)
          Specify additional parameters to send to the server.
 void setVoice(java.lang.String voice)
          Sets the voice to the specified variable.
 TTSResult speak(java.lang.String text)
          Converts text into speech.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static java.lang.String version
Method Detail

getInstance

public static iSpeechSynthesis getInstance(java.lang.String apiKey,
                                           boolean production)
                                    throws InvalidApiKeyException
Gets an instance of the iSpeech Speech Synthesis class. The ApiKey is only required on initial call to this method.

Parameters:
apiKey - Your API key provided by iSpeech.
production - Set to true if you are deploying your application. Set to false if you are using the sandbox environment.
Throws:
InvalidApiKeyException
java.lang.IllegalArgumentException - If the key is null or invalid.

setVoice

public void setVoice(java.lang.String voice)
Sets the voice to the specified variable.

Parameters:
voice - Visit the iSpeech Developers center at http://www.ispeech.org or contact sales@ispeech.org to obtain a list of valid voices enabled for your account.

setOptionalCommand

public void setOptionalCommand(java.lang.String command,
                               java.lang.String parameter)
Specify additional parameters to send to the server.


clearMetaAndOptionalCommands

public void clearMetaAndOptionalCommands()
Clears any associated meta and optional parameters.


speak

public TTSResult speak(java.lang.String text)
                throws java.io.IOException,
                       ApiException
Converts text into speech.

Parameters:
text - The text you wish to have converted into audio.
Returns:
Returns an TTSResult containing audio data and size.
Throws:
java.io.IOException - If a general error occurs or could not connect to the server
java.lang.IllegalArgumentException - If you are out of credits
ApiException