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

What is beam size? #392

Closed
vadi2 opened this issue Aug 1, 2023 · 5 comments
Closed

What is beam size? #392

vadi2 opened this issue Aug 1, 2023 · 5 comments

Comments

@vadi2
Copy link

vadi2 commented Aug 1, 2023

Beam size seems to be a significant hyperparameter for faster-whisper's performance - is there an explanation for what it is anywhere?

@guillaumekln
Copy link
Contributor

guillaumekln commented Aug 1, 2023

Search for "beam search". For example Wikipedia has an entry: https://en.wikipedia.org/wiki/Beam_search

The beam size, a.k.a. beam width, controls the number of paths that are explored at each step when generating an output.

@vadi2
Copy link
Author

vadi2 commented Aug 1, 2023

Thanks!

@vadi2 vadi2 closed this as completed Aug 1, 2023
@Geremia
Copy link

Geremia commented Aug 8, 2023

@vadi2 I asked your question on AI StackExchange and got at least one good answer.

@richmailYT
Copy link

Does a bigger beam size increase the time it takes to transcribe an audio file? Is there an optimal beam size? Does a bigger beam size increase the accuracy of the final transcription?

@meet1919
Copy link

meet1919 commented Oct 6, 2024

@richmailYT

Does a bigger beam size increase the time it takes to transcribe an audio file? Is there an optimal beam size? Does a bigger beam size increase the accuracy of the final transcription?

As the transcribe() function has 5 as the default beam_size so I guess it should be the optimal beam size, but you can still play with it. According to this

Search for "beam search". For example Wikipedia has an entry: https://en.wikipedia.org/wiki/Beam_search

The beam size, a.k.a. beam width, controls the number of paths that are explored at each step when generating an output.

More the paths explored more are the chances to reach the goal and prevent it from getting pruned and it will increase the time it takes to transcribe.

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

No branches or pull requests

5 participants