Skip to content

Releases: dialogflow/dialogflow-android-client

v1.6.1 API.AI - New VAD

21 May 04:55
Compare
Choose a tag to compare

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

20 Apr 08:43
Compare
Choose a tag to compare

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

15 Apr 09:11
Compare
Choose a tag to compare

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

26 Mar 06:35
Compare
Choose a tag to compare

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

19 Mar 06:31
Compare
Choose a tag to compare

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

05 Mar 13:41
Compare
Choose a tag to compare

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

06 Feb 10:34
Compare
Choose a tag to compare

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

15 Jan 13:29
Compare
Choose a tag to compare

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

10 Dec 09:57
Compare
Choose a tag to compare

This release add support for the three languages:

  • Russian
  • German
  • Portuguese

Use AIConfiguration.SupportedLanguages on AIConfiguration initialization to select language.

v1.1.0

06 Nov 07:19
Compare
Choose a tag to compare

Added Speaktoit recognition support. Now you can select recognition engine on initialize.
Added user contexts support, so on listening start you can (optionally) provide list of contexts (for details see Contexts and sample application)