public class InteractionClient
extends java.lang.Object
InteractionConfig
.
Set the these configurations before initializing this class.Modifier and Type | Field and Description |
---|---|
static int |
SAMPLE_SIZE
The size of the each sample in bit.
|
Constructor and Description |
---|
InteractionClient(android.content.Context context,
AWSCredentialsProvider credentialsProvider,
Regions region,
InteractionConfig interactionConfig) |
InteractionClient(android.content.Context context,
AWSCredentialsProvider credentialsProvider,
Regions region,
InteractionConfig interactionConfig,
ClientConfiguration clientConfiguration) |
InteractionClient(android.content.Context context,
AWSCredentialsProvider credentialsProvider,
Regions region,
java.lang.String botName,
java.lang.String botAlias)
Constructors for Amazon Lex local clients.
|
Modifier and Type | Method and Description |
---|---|
void |
audioInForAudioOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Accept input from mic (speech) for audio response from the service.
|
void |
audioInForAudioOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes,
java.util.Map<java.lang.String,java.lang.String> requestAttributes)
Accept input from mic (speech) for audio response from the service.
|
void |
audioInForTextOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Accept input from mic (speech) for text,
String , response from the service. |
void |
audioInForTextOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes,
java.util.Map<java.lang.String,java.lang.String> requestAttributes)
Accept input from mic (speech) for text,
String , response from the service. |
void |
cancel()
Cancel the current with the user's.
|
void |
setAudioPlaybackListener(AudioPlaybackListener audioPlaybackListener)
Assign a audio playback listener to this interaction client.
|
void |
setInteractionListener(InteractionListener interactionListener)
Set an interaction listener for this client.
|
void |
setMicrophoneListener(MicrophoneListener microphoneListener)
Assign a listener for microphone events.
|
void |
textInForAudioOut(java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Accept input as text,
String , for audio response from the service. |
void |
textInForAudioOut(java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> sessionAttributes,
java.util.Map<java.lang.String,java.lang.String> requestAttributes)
Accept input as text,
String , for audio response from the service. |
void |
textInForTextOut(java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Accept input as text,
String , for text, String , reponse from the service. |
void |
textInForTextOut(java.lang.String text,
java.util.Map<java.lang.String,java.lang.String> sessionAttributes,
java.util.Map<java.lang.String,java.lang.String> requestAttributes)
Accept input as text,
String , for text, String , reponse from the service. |
public static final int SAMPLE_SIZE
public InteractionClient(android.content.Context context, AWSCredentialsProvider credentialsProvider, Regions region, java.lang.String botName, java.lang.String botAlias)
public InteractionClient(android.content.Context context, AWSCredentialsProvider credentialsProvider, Regions region, InteractionConfig interactionConfig)
public InteractionClient(android.content.Context context, AWSCredentialsProvider credentialsProvider, Regions region, InteractionConfig interactionConfig, ClientConfiguration clientConfiguration)
public void audioInForTextOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes, java.util.Map<java.lang.String,java.lang.String> requestAttributes)
String
, response from the service.sessionAttributes
- Map
.requestAttributes
- Map
.public void audioInForTextOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
String
, response from the service.sessionAttributes
- Map
.public void audioInForAudioOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes, java.util.Map<java.lang.String,java.lang.String> requestAttributes)
InteractionConfig.setEnableAudioPlayback(boolean)
.sessionAttributes
- Map
.requestAttributes
- Map
.public void audioInForAudioOut(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
InteractionConfig.setEnableAudioPlayback(boolean)
.sessionAttributes
- Map
.public void textInForTextOut(java.lang.String text, java.util.Map<java.lang.String,java.lang.String> sessionAttributes, java.util.Map<java.lang.String,java.lang.String> requestAttributes)
String
, for text, String
, reponse from the service.text
- input as String
.sessionAttributes
- Map
.requestAttributes
- Map
.public void textInForTextOut(java.lang.String text, java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
String
, for text, String
, reponse from the service.text
- input as String
.sessionAttributes
- Map
.public void textInForAudioOut(java.lang.String text, java.util.Map<java.lang.String,java.lang.String> sessionAttributes, java.util.Map<java.lang.String,java.lang.String> requestAttributes)
String
, for audio response from the service. To allow the to playback
audio from the service response, use InteractionConfig.setEnableAudioPlayback(boolean)
.text
- input as String
.sessionAttributes
- Map
.requestAttributes
- Map
.public void textInForAudioOut(java.lang.String text, java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
String
, for audio response from the service. To allow the to playback
audio from the service response, use InteractionConfig.setEnableAudioPlayback(boolean)
.text
- input as String
.sessionAttributes
- Map
.public void cancel()
public void setAudioPlaybackListener(AudioPlaybackListener audioPlaybackListener)
audioPlaybackListener
- public void setMicrophoneListener(MicrophoneListener microphoneListener)
microphoneListener
- public void setInteractionListener(InteractionListener interactionListener)
interactionListener
- the interaction listener InteractionListener
.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.