Skip to content

In filter_ctc_output(), remove redundant filtering#1584

Merged
anautsch merged 1 commit intospeechbrain:developfrom
olvb:faster-ctc-filtering
Sep 26, 2022
Merged

In filter_ctc_output(), remove redundant filtering#1584
anautsch merged 1 commit intospeechbrain:developfrom
olvb:faster-ctc-filtering

Conversation

@olvb
Copy link
Copy Markdown

@olvb olvb commented Sep 26, 2022

Hi,
I noticed that in filter_ctc_output() we had 2 blocks of code performing the same task: merging repeated tokens.
I kept the groupby() rather than the list comprehension as it appears to be faster.

Before this commit we were filtering out twice the repeated tokens:
once with the list comprehension and once with groupby.
Copy link
Copy Markdown
Collaborator

@anautsch anautsch left a comment

Choose a reason for hiding this comment

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

Well spotted, @olvb !
(it's in there since the first version of this file)

lgtm

@anautsch anautsch merged commit aef1468 into speechbrain:develop Sep 26, 2022
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