Skip to content

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