Watson STT でカスタマイズ辞書(1)


カスタマイズの一覧をリスト

java-sdk-3.5.3-jar-with-dependencies.jar を利用。


package stt;

import java.util.List;

import com.ibm.watson.developer_cloud.http.ServiceCall;
import com.ibm.watson.developer_cloud.speech_to_text.v1.SpeechToText;
import com.ibm.watson.developer_cloud.speech_to_text.v1.model.Customization;

public class Customize01ListMain {

    public static void main(String[] args) throws Exception {

        String username = "username";
        String password = "password";

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

        ServiceCall<List<Customization>> o = service.getCustomizations("ja-JP");

        List<Customization> list = o.execute();
        for (Customization c : list) {
            System.err.println(c.getId());
        }

    }

}