androidibm-watsonwatson-dialog

Watson API in Android


I am new to this API (Watson API) and my Android experience is kind a rusty so please bear with me if I cannot catch up with your terminologies/ideas right away.

According to Watson API guide (you can check it in here https://github.com/watson-developer-cloud/java-sdk)

"Once you have credentials, copy config.properties.example to src/test/resources/config.properties, and fill them in as necessary."

Currently I am stuck in this area. Where can I find that config file?


Solution

  • You only need to copy config.properties if you want to run the tests cases. If you just want to use the sdk you just need to specify the service credentials using the setUsernameAndPassword() method.

    For example:

    SpeechToText service = new SpeechToText();
    service.setUsernameAndPassword("<username>", "<password>");
    

    In order to use the IBM Watson APIs in Android, I would suggest you look at the android-sdk. The repository README has an example of how to transcribe audio from the microphone using the Speech to Text API.