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

docs(samples): remove unsupported field RecognitionResult #631

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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