Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use selectedAlternative for 0.0 confidence transcriptions #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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