com.memetix.mst.speak
Class Speak
java.lang.Object
com.memetix.mst.MicrosoftTranslatorAPI
com.memetix.mst.speak.Speak
public final class Speak
- extends MicrosoftTranslatorAPI
Speak
Provides an interface to the Microsoft Translator Speak service method
Returns a string which is a URL to a wave stream of the passed-in text being spoken in the desired language.
Uses the AJAX Interface V2 - see: http://msdn.microsoft.com/en-us/library/ff512405.aspx
- Author:
- Jonathan Griggs
| Fields inherited from class com.memetix.mst.MicrosoftTranslatorAPI |
apiKey, ENCODING, PARAM_APP_ID, PARAM_FROM_LANG, PARAM_LANGUAGE_CODES, PARAM_LOCALE, PARAM_SENTENCES_LANGUAGE, PARAM_SPOKEN_LANGUAGE, PARAM_TEXT_ARRAY, PARAM_TEXT_SINGLE, PARAM_TO_LANG |
| Methods inherited from class com.memetix.mst.MicrosoftTranslatorAPI |
buildStringArrayParam, getToken, retrieveIntArray, retrieveString, retrieveStringArr, retrieveStringArr, setClientId, setClientSecret, setContentType, setHttpReferrer, setKey, validateServiceState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
execute
public static String execute(String text,
SpokenDialect language)
throws Exception
- Detects the language of a supplied String.
- Parameters:
text - The String to generate a WAV forto - The language code to translate to
- Returns:
- A String containing the URL to a WAV of the spoken text
- Throws:
Exception - on error.
Copyright © 2012. All Rights Reserved.