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

feat: add new option "return_segments" to allow accessing word probabilities and other meta information #75

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

Conversation

oddlama
Copy link
Contributor

@oddlama oddlama commented Jun 20, 2024

Currently RealtimeSTT doesn't expose the meta information about segments and their words, which are otherwise available when passing word_timestamps=True to the faster-whisper model. This information is very nice to have when building an application on top of RealtimeSTT, since it allow displaying word detection certainties, or to align words temporally.

This introduces a new option return_segments that enables word_timestamps=True on both the realtime and main model, and causes the related functions to take a tuple (text, segments) instead of just text. This change is opt-in and fully backward compatible.

@oddlama
Copy link
Contributor Author

oddlama commented Jun 20, 2024

I will address the conflicts as soon as #71 is addressed, otherwise I can't test my changes.

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