Skip to content

Add bounds check for postprocess_utils.py abbr_dispose() - #2209

Merged
LauraGPT merged 1 commit into
modelscope:mainfrom
BitSteve:patch-1
Nov 15, 2024
Merged

LauraGPT merged 1 commit into
modelscope:mainfrom
BitSteve:patch-1

Conversation

@BitSteve

@BitSteve BitSteve commented Nov 13, 2024 •

Copy link
Copy Markdown
Contributor

Trying to run this example for speech_timestamp_prediction-v1-16k-offline here for different audios. I see my English audio failed with this error.
Added this extra check locally and solved the issue.

"/Users/{USER}/.pyenv/versions/funasr_usage/lib/python3.12/site-packages/funasr/utils/postprocess_utils.py", line 127, in abbr_dispose
    end = time_stamp[ts_nums[num]][1]
          ~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range

"/Users/{USER}/.pyenv/versions/funasr_usage/lib/python3.12/site-packages/funasr/utils/postprocess_utils.py", line 127, in abbr_dispose
    end = time_stamp[ts_nums[num]][1]
          ~~~~~~~~~~^^^^^^^^^^^^^^
IndexError: list index out of range

@LauraGPT LauraGPT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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.

2 participants