Releases: dialogflow/dialogflow-android-client
v1.6.1 API.AI - New VAD
In this release voice activity detection algorithm was improved and now have much better quality.
Also added option to set start/stop listening sounds if you use Speaktoit recognition. Use AIConfiguration
for this:
config.setRecognizerStartSound(getResources().openRawResourceFd(R.raw.test_start));
config.setRecognizerStopSound(getResources().openRawResourceFd(R.raw.test_stop));
config.setRecognizerCancelSound(getResources().openRawResourceFd(R.raw.test_cancel));
Additionally fixed some issues related to old Android versions.
v1.5.0 API.AI - Protocol change
This release introduces small but breaking change in protocol model.
Now Fulfillment field from API.AI console becomes composite field in the protocol. Earlier it was simple string field named "speech".
So, "speech" field now in the Fulfillment object. And you should change
response.getResult().getSpeech()
to
response.getResult().getFulfillment().getSpeech()
v1.4.6 API.AI - Another errors processing
From this release you should not check response.isError()
in the onResult
handler. Now errors of all types goes through onError
handler.
Also fixed some small issues.
v1.4.5 API.AI - Add recognition dialog
In this release we added AIDialog class, that makes it more easier to integrate our service to your app.
Take a look:
AIConfiguration aiConfiguration = new AIConfiguration(
"access_token", "subscription_key",
AIConfiguration.SupportedLanguages.English,
AIConfiguration.RecognitionEngine.System
);
aiDialog = new AIDialog(activity, aiConfiguration);
aiDialog.setResultsListener(new AIDialog.AIDialogListener() {
@Override
public void onResult(AIResponse aiResponse) {
// TODO Process aiResponse
}
@Override
public void onError(AIError aiError) {
// TODO show error message
}
});
aiDialog.showAndListen();
We also added few methods for comfortable work with parameters (to the Result mapping class)
result.getStringParameter("name");
result.getDateParameter("name");
result.getDateTimeParameter("name");
result.getTimeParameter("name");
result.getIntParameter("name");
result.getFloatParameter("name");
v1.3.2 API.AI - SDK improvements
Resolved issue #6, parameter existence can be checked with simpler code
result.getParameters().containsKey("key")
v1.3.1 API.AI - Add option to disable VAD for Speaktoit recognition
In some cases you may need to disable automatic End-of-Speech detection. Now you can disable this feature with config flag voiceActivityDetectionEnabled
(default value of the option is true):
config.setVoiceActivityDetectionEnabled(false);
Please note that the option affects only Speaktoit recognition.
v1.3.0 API.AI - New languages, new protocol
This release add support for 8 new languages:
- Spanish
- French
- Italian
- Japanese
- Korean
- three dialects of Chinese (zh-CN, zh-HK, zh-TW)
Check the AIConfiguration. SupportedLanguages and the api.ai website for full list of supported Languages.
Also changed response data format - now output contexts is the array of JSON objects enclosed in 'result' object, and contains 'parameters' and 'name' fields.
"contexts": [
{
"name": "context1",
"parameters": {
"weather": "today weather"
}
},
{
"name": "context2",
"parameters": {
"weather": "today weather",
"location": "New York"
}
}
]
In code mapping
@SerializedName("contexts")
private AIOutputContext[] contexts;
Don't forget to change library version in dependencies ;-)
dependencies {
compile 'ai.api:sdk:1.3.0@aar'
}
v1.2.0 API.AI - microphone button control
This release add special button control for really easy service integration. Use this code snippet to add API.AI button to your Activity:
<ai.api.ui.AIButton
android:id="@+id/micButton"
android:layout_height="152dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
style="@style/Microphone"
/>
And this code snippet to get button ready to action:
final AIConfiguration config = new AIConfiguration("ACCESS_TOKEN",
"SUBSCRIPTION_KEY",
AIConfiguration.SupportedLanguages.English,
AIConfiguration.RecognitionEngine.System);
aiButton = (AIButton) findViewById(R.id.micButton);
aiButton.initialize(config);
aiButton.setResultsListener(this);
(don't forget to implement AIButton.AIButtonListener
of course ;)
See sample app for more details.
Attention:
-
Enumeration item RecognitionEngine.Google now deprecated. Use RecognitionEngine.System instead.
-
Library dependency now looks like:
compile 'ai.api:sdk:1.2.0@aar'
Also you need to add third party dependencies:
compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.google.code.gson:gson:2.3' compile 'commons-io:commons-io:2.4'
v1.1.1 Languages support
This release add support for the three languages:
- Russian
- German
- Portuguese
Use AIConfiguration.SupportedLanguages on AIConfiguration initialization to select language.