Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
docs(samples): remove unsupported field RecognitionResult (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
kweinmeister committed Mar 29, 2022
1 parent 424da78 commit 36b8519
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@ public void onStart(StreamController controller) {}
public void onResponse(StreamingTranslateSpeechResponse response) {
StreamingTranslateSpeechResult res = response.getResult();
String translation = res.getTextTranslationResult().getTranslation();
String source = res.getRecognitionResult();

if (res.getTextTranslationResult().getIsFinal()) {
System.out.println(String.format("\nFinal translation: %s", translation));
System.out.println(String.format("Final recognition result: %s", source));
} else {
System.out.println(String.format("\nPartial translation: %s", translation));
System.out.println(String.format("Partial recognition result: %s", source));
}
}

Expand Down

0 comments on commit 36b8519

Please sign in to comment.