Skip to content

Conversation

@CGarces
Copy link

@CGarces CGarces commented Jul 6, 2023

If lastItem['content'] is empty the lastChar calculation will fail.

Issue #, if available:

Description of changes:

If selectedAlternative is empty due a confidence of 0.0, it set the transcript['content'] value as empty.

When that empty value is the last one on transcripts array, the code that calculate the last character some lines bellow, will fail with and string index out of range error.

image

Use selectedAlternative as workarround.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

If length is zero, code will fail with string index out of range error.
@CGarces CGarces marked this pull request as ready for review July 6, 2023 12:27
@CGarces CGarces changed the title Set dummy selectedAlternative Use selectedAlternative for 0.0 confidence transcriptions Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant