Title: Duplicate/combined word (lists) when using the response 'SpeechRecognitionResult' from longRunningRecognizeAsync · Issue #3903 · googleapis/google-cloud-java · GitHub
Open Graph Title: Duplicate/combined word (lists) when using the response 'SpeechRecognitionResult' from longRunningRecognizeAsync · Issue #3903 · googleapis/google-cloud-java
X Title: Duplicate/combined word (lists) when using the response 'SpeechRecognitionResult' from longRunningRecognizeAsync · Issue #3903 · googleapis/google-cloud-java
Description: When looping trough the 'SpeechRecognitionResult' objects, I noticed that the transcript attribute and the 'words_' list do not match for (at least) the last result. In our app, we always use the first and only alternative. I noticed tha...
Open Graph Description: When looping trough the 'SpeechRecognitionResult' objects, I noticed that the transcript attribute and the 'words_' list do not match for (at least) the last result. In our app, we always use the f...
X Description: When looping trough the 'SpeechRecognitionResult' objects, I noticed that the transcript attribute and the 'words_' list do not match for (at least) the last result. In our app, we ...
Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/3903
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicate/combined word (lists) when using the response 'SpeechRecognitionResult' from longRunningRecognizeAsync","articleBody":"When looping trough the 'SpeechRecognitionResult' objects, I noticed that the transcript attribute and the 'words_' list do not match for (at least) the last result. In our app, we always use the first and only alternative. I noticed that the word lists do match the transcript from the first few results, but for the last result, all words including the last one will be returned in words. I would expect that the last result only contains the words which are related to that specific transcript.\r\n\r\nI assume this is a bug. If not; please advice.\r\n\r\n#### Environment details\r\n\r\n- OS: Windows 10\r\n- Java version: 1.8.0_102\r\n- google-cloud-java version(s): google-cloud-speech-0.67.0-beta\r\n\r\n#### Code snippet\r\n\r\nIn order to clarify this, I added a simplified code snippet below.\r\n\r\n```java\r\nList\u003cSpeechRecognitionResult\u003e results = response.getResultsList();\r\n\r\nfor (SpeechRecognitionResult result : results) {\r\n SpeechRecognitionAlternative alternative = result.getAlternativesList().get(0);\r\n String transcript = alternative.getTranscript();\r\n for (WordInfo wordInfo : alternative.getWordsList()) {\r\n String word = wordInfo.getWord();\r\n }\r\n}\r\n```\r\n\r\nIn my current example, we have 3 results. The number of words are correct for the first two, but the third (last) is incorrect and includes all words from the whole text.\r\n\r\nResult 0: Only the word Jaguar (both the transcript and the only word)\r\n\r\n\r\nResult 1: A longer transcript, with 102 (correct) words in total\r\n\r\n\r\nResult 2: A short transcript with only 23 words. As you can see, the list with words includes all 126 words (1+102+23).\r\n\r\n","author":{"url":"https://github.com/JeroenAppel","@type":"Person","name":"JeroenAppel"},"datePublished":"2018-11-05T15:37:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/3903/google-cloud-java/issues/3903"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:845539d4-21b9-5f38-6c75-5b1d872892d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CED6:321901:216217:302971:6A4CCD24 |
| html-safe-nonce | 0274d525ef28d53dcd98cad18638c63871830590e01ab5a37d2d8bd5202c5553 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUQ2OjMyMTkwMToyMTYyMTc6MzAyOTcxOjZBNENDRDI0IiwidmlzaXRvcl9pZCI6IjI1MDAwOTgzODYwMjA4NDY4ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fe594d1d9a8582b821e870449c62bff15c40e1b51980c8e97f310bbab6945804 |
| hovercard-subject-tag | issue:377454272 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/3903/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b84193f5eecad30ddf1447fc8ba3c31f0ff3d7044f3954dd5c289bc1e2b3a970/googleapis/google-cloud-java/issues/3903 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b84193f5eecad30ddf1447fc8ba3c31f0ff3d7044f3954dd5c289bc1e2b3a970/googleapis/google-cloud-java/issues/3903 |
| og:image:alt | When looping trough the 'SpeechRecognitionResult' objects, I noticed that the transcript attribute and the 'words_' list do not match for (at least) the last result. In our app, we always use the f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JeroenAppel |
| hostname | github.com |
| expected-hostname | github.com |
| None | ee8a9d18044a05fe2d57b9ae797da38c8be34effb03f015f7c42e94770d28a1b |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 26181278 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26181278 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f84814acc6f036583fd43463f5847a846243d2a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width