public class SpeechSendText extends SpeechSendEvent
SpeechSendEvent
that allows an arbitrary text string to be sent to the AVS servers, translated through Google's text to speech engine
This speech is rendered using the VoiceHelper utility class, and is done on whatever thread this call is runningmCallback, mOutputStream
Constructor and Description |
---|
SpeechSendText() |
Modifier and Type | Method and Description |
---|---|
protected okhttp3.RequestBody |
getRequestBody() |
void |
sendText(Context context,
java.lang.String url,
java.lang.String accessToken,
java.lang.String text,
AsyncCallback<AvsResponse,java.lang.Exception> callback)
Use VoiceHelper utility to create an audio file from arbitrary text using Text-To-Speech to be passed to the AVS servers
|
addFormDataParts, getEvent
completeGet, completePost, prepareConnection
public void sendText(Context context, java.lang.String url, java.lang.String accessToken, java.lang.String text, AsyncCallback<AvsResponse,java.lang.Exception> callback) throws java.io.IOException
context
- local/application contexturl
- the URL to which we're sending the AVS postaccessToken
- our user's access token for the servertext
- the text we want to translate into speechcallback
- our event callbacksjava.io.IOException
@NotNull protected okhttp3.RequestBody getRequestBody()
getRequestBody
in class SpeechSendEvent