public class ALTextToSpeech extends ALProxy
Constructor and Description |
---|
ALTextToSpeech(Session session) |
Modifier and Type | Method and Description |
---|---|
void |
clearStats() |
void |
disableNotifications()
Disables the notifications puted in ALMemory during the synthesis (TextStarted, TextDone, CurrentBookMark, CurrentWord, ...)
|
void |
enableNotifications()
Enables the notifications puted in ALMemory during the synthesis (TextStarted, TextDone, CurrentBookMark, CurrentWord, ...)
|
void |
exit()
Exits and unregisters the module.
|
java.util.List<java.lang.String> |
getAvailableLanguages()
Outputs the languages installed on the system.
|
java.util.List<java.lang.String> |
getAvailableVoices()
Outputs the available voices.
|
java.lang.String |
getBrokerName()
Gets the name of the parent broker.
|
java.lang.String |
getLanguage()
Returns the language currently used by the text-to-speech engine.
|
java.lang.String |
getLanguageEncoding(java.lang.String pLanguage)
Returns the encoding that should be used with the specified language.
|
java.lang.Object |
getMethodHelp(java.lang.String methodName)
Retrieves a method's description.
|
java.util.List<java.lang.String> |
getMethodList()
Retrieves the module's method list.
|
java.lang.Object |
getModuleHelp()
Retrieves the module's description.
|
java.lang.Float |
getParameter(java.lang.String pParameterName)
Returns the value of one of the voice parameters.
|
java.util.List<java.lang.String> |
getSupportedLanguages()
Outputs all the languages supported (may be installed or not).
|
java.lang.String |
getUsage(java.lang.String name)
Gets the method usage string.
|
java.lang.String |
getVoice()
Returns the voice currently used by the text-to-speech engine.
|
java.lang.Float |
getVolume()
Fetches the current volume the text to speech.
|
java.lang.Boolean |
isRunning(java.lang.Integer id)
Returns true if the method is currently running.
|
java.lang.Boolean |
isStatsEnabled() |
java.lang.Boolean |
isTraceEnabled() |
void |
loadVoicePreference(java.lang.String pPreferenceName)
Loads a set of voice parameters defined in a xml file contained in the preferences folder.The name of the xml file must begin with ALTextToSpeech_Voice_
|
java.lang.String |
locale()
Get the locale associate to the current language.
|
java.lang.Boolean |
ping()
Just a ping.
|
void |
resetSpeed()
Changes the parameters of the voice.
|
void |
say(java.lang.String stringToSay)
Performs the text-to-speech operations : it takes a std::string as input and outputs a sound in both speakers.
|
void |
say(java.lang.String stringToSay,
java.lang.String language)
Performs the text-to-speech operations in a specific language: it takes a std::string as input and outputs a sound in both speakers.
|
void |
sayToFile(java.lang.String pStringToSay,
java.lang.String pFileName)
Performs the text-to-speech operations: it takes a std::string as input and outputs the corresponding audio signal in the specified file.
|
void |
sayToFileAndPlay(java.lang.String pStringToSay)
This method performs the text-to-speech operations: it takes a std::string, outputs the synthesis resulting audio signal in a file, and then plays the audio file.
|
void |
setLanguage(java.lang.String pLanguage)
Changes the language used by the Text-to-Speech engine.
|
void |
setLanguageDefaultVoice(java.lang.String Language,
java.lang.String Voice)
Sets a voice as the default voice for the corresponding language
|
void |
setParameter(java.lang.String pEffectName,
java.lang.Float pEffectValue)
Changes the parameters of the voice.
|
void |
setVoice(java.lang.String pVoiceID)
Changes the voice used by the text-to-speech engine.
|
void |
setVolume(java.lang.Float volume)
Sets the volume of text-to-speech output.
|
void |
stop(java.lang.Integer id)
returns true if the method is currently running
|
void |
stopAll()
This method stops the current and all the pending tasks immediately.
|
java.lang.String |
version()
Returns the version of the module.
|
java.lang.Boolean |
wait(java.lang.Integer id,
java.lang.Integer timeoutPeriod)
Wait for the end of a long running method that was called using 'post'
|
call, connect, connect, disconnect, getNaoqiType, getService, isProxyReady, setService
public ALTextToSpeech(Session session) throws java.lang.Exception
java.lang.Exception
public void loadVoicePreference(java.lang.String pPreferenceName) throws CallError, java.lang.InterruptedException
pPreferenceName
- Name of the voice preference.CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getAvailableVoices() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Float getVolume() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String locale() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void setLanguageDefaultVoice(java.lang.String Language, java.lang.String Voice) throws CallError, java.lang.InterruptedException
Language
- The language among those available on your robot as a StringVoice
- The voice among those available on your robot as a StringCallError
java.lang.InterruptedException
public void setVolume(java.lang.Float volume) throws CallError, java.lang.InterruptedException
volume
- Volume (between 0.0 and 1.0).CallError
java.lang.InterruptedException
public void enableNotifications() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void disableNotifications() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isStatsEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void clearStats() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean isTraceEnabled() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void exit() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String version() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean ping() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getMethodList() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Object getMethodHelp(java.lang.String methodName) throws CallError, java.lang.InterruptedException
methodName
- The name of the method.CallError
java.lang.InterruptedException
public java.lang.Object getModuleHelp() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.Boolean wait(java.lang.Integer id, java.lang.Integer timeoutPeriod) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'timeoutPeriod
- The timeout period in ms. To wait indefinately, use a timeoutPeriod of zero.CallError
java.lang.InterruptedException
public java.lang.Boolean isRunning(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- The ID of the method that was returned when calling the method using 'post'CallError
java.lang.InterruptedException
public void stop(java.lang.Integer id) throws CallError, java.lang.InterruptedException
id
- the ID of the method to wait forCallError
java.lang.InterruptedException
public java.lang.String getBrokerName() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String getUsage(java.lang.String name) throws CallError, java.lang.InterruptedException
name
- The name of the method.CallError
java.lang.InterruptedException
public void say(java.lang.String stringToSay) throws CallError, java.lang.InterruptedException
stringToSay
- Text to say, encoded in UTF-8.CallError
java.lang.InterruptedException
public void say(java.lang.String stringToSay, java.lang.String language) throws CallError, java.lang.InterruptedException
stringToSay
- Text to say, encoded in UTF-8.language
- Language used to say the text.CallError
java.lang.InterruptedException
public void sayToFile(java.lang.String pStringToSay, java.lang.String pFileName) throws CallError, java.lang.InterruptedException
pStringToSay
- Text to say, encoded in UTF-8.pFileName
- RAW file where to store the generated signal. The signal is encoded with a sample rate of 22050Hz, format S16_LE, 2 channels.CallError
java.lang.InterruptedException
public void sayToFileAndPlay(java.lang.String pStringToSay) throws CallError, java.lang.InterruptedException
pStringToSay
- Text to say, encoded in UTF-8.CallError
java.lang.InterruptedException
public void stopAll() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void setLanguage(java.lang.String pLanguage) throws CallError, java.lang.InterruptedException
pLanguage
- Language name. Must belong to the languages available in TTS (can be obtained with the getAvailableLanguages method). It should be an identifier std::string.CallError
java.lang.InterruptedException
public java.lang.String getLanguage() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.lang.String getLanguageEncoding(java.lang.String pLanguage) throws CallError, java.lang.InterruptedException
pLanguage
- Language name (as a std::string). Must belong to the languages available in TTS.CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getAvailableLanguages() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public java.util.List<java.lang.String> getSupportedLanguages() throws CallError, java.lang.InterruptedException
CallError
java.lang.InterruptedException
public void resetSpeed() throws CallError, java.lang.InterruptedException
pEffectName
- Name of the parameter.CallError
java.lang.InterruptedException
public void setParameter(java.lang.String pEffectName, java.lang.Float pEffectValue) throws CallError, java.lang.InterruptedException
pEffectName
- Name of the parameter.pEffectValue
- Value of the parameter.CallError
java.lang.InterruptedException
public java.lang.Float getParameter(java.lang.String pParameterName) throws CallError, java.lang.InterruptedException
pParameterName
- Name of the parameter.CallError
java.lang.InterruptedException
public void setVoice(java.lang.String pVoiceID) throws CallError, java.lang.InterruptedException
pVoiceID
- The voice (as a std::string).CallError
java.lang.InterruptedException
Aldebaran SDK for Java
Copyright 2006-2015 Aldebaran Robotics. All Rights Reserved.