如何使用android的azure认知翻译服务?

问题描述 投票:0回答:1

我想使用azure认知服务构建一个文本翻译器,但我不知道如何在android中使用它。

android azure translate microsoft-cognitive
1个回答
0
投票

您需要安装SDK,然后调用如下

 try {
      translatedText = Translate.execute(sentence, baseLanguage, targetLanguage);
      return true;
     } catch (Exception e) {
      e.printStackTrace();
      return false;
 }
© www.soinside.com 2019 - 2024. All rights reserved.