Skip to content

Commit

Permalink
samples: Fixes seconds reported in word time offsets and enables mave…
Browse files Browse the repository at this point in the history
…n checks
  • Loading branch information
gguuss authored and chingor13 committed Aug 15, 2020
1 parent 027d0e2 commit 23b3862
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,11 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception, IOExceptio
System.out.printf("Transcription: %s\n",alternative.getTranscript());
for (WordInfo wordInfo: alternative.getWordsList()) {
System.out.println(wordInfo.getWord());
System.out.printf("\t%s ns - %s ns\n",
wordInfo.getStartTime().getNanos(), wordInfo.getEndTime().getNanos());
System.out.printf("\t%s.%s sec - %s.%s sec\n",
wordInfo.getStartTime().getSeconds(),
wordInfo.getStartTime().getNanos() / 100000000,
wordInfo.getEndTime().getSeconds(),
wordInfo.getEndTime().getNanos() / 100000000);
}
}
}
Expand Down

0 comments on commit 23b3862

Please sign in to comment.