You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
longRunningRecognizeAsync return SpeechRecognitionResult whit Alternatives different from first have word list empty #3316
// after longRunningRecognizeAsync
// with setMaxAlternatives to 6
for ( SpeechRecognitionAlternative alt : result.getAlternativesList()) {
alt.getConfidence(); // is ok full
alt.getTranscript(); // is ok full
for ( WordInfo word : alt.getWordsList() ) { // NOT ok word list is empty after first ..
//speechRecognitionAlternative
ParolaTrascrizione parola = new ParolaTrascrizione(word);
listParole.add(parola);
}
}
Please reopen ..
ParolaTrascrizione iis my class. it is not relevant.
I enable WordTimeOffsets in RecognitionConfig .
the problem is that the word list is only present in the first occurrence
of the loop, not in the successive ones.
example :
//index 0 ok
result.getAlternativesList().get(0).getTranscript() // String is not empty
ok
result.getAlternativesList().get(0).getWordsList(); // list is not empty ok
//index 1 inconsistency
result.getAlternativesList().get(1).getTranscript() // String is not empty
ok
result.getAlternativesList().get(1).getWordsList(); // list is empty !!!!
Error
Hi, in order for the alternatives in SpeechRecognitionResult to include a
list of WordInfo, please enable it in RecognitionConfig:
RecognitionConfig config =
RecognitionConfig.newBuilder()
.setEnableWordTimeOffsets(true)
... // other settings
.build();
I am closing this issue, but feel free to let us know if you have further
questions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3316 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOSfJRb44LZEE0Kd0RGuvQoN2pPGua9zks5t6Cm3gaJpZM4UQRs6>
.
Hi,
Thanks for clarifying that. However it seems speech only provides time offset information for the top result according to this. This seems to be an intended behavior of the server side.
Activity
andreamlin commentedon Jun 4, 2018
Hello,
Would you mind providing more clarification on the exact nature of the problem, where it fails, and what
ParolaTrascrizioneis?yihanzhen commentedon Jun 6, 2018
Hi, in order for the
alternativesinSpeechRecognitionResultto include a list ofWordInfo, please enable it inRecognitionConfig:I am closing this issue, but feel free to let us know if you have further questions.
bud4 commentedon Jun 6, 2018
yihanzhen commentedon Jun 6, 2018
Hi,
Thanks for clarifying that. However it seems
speechonly provides time offset information for the top result according to this. This seems to be an intended behavior of the server side.bud4 commentedon Jun 6, 2018
deps: update dependency com.google.errorprone:error_prone_annotations…
chore(main): release 2.49.0 (#3312)
chore(spanner): update executor build to thin jar (#3316)