com.memetix.mst.speak
Class Speak

java.lang.Object
  extended by com.memetix.mst.MicrosoftTranslatorAPI
      extended by 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

Field Summary
 
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
 
Method Summary
static String execute(String text, SpokenDialect language)
          Detects the language of a supplied String.
 
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
 

Method Detail

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 for
to - 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.