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

Remove non-speech descriptions from output #3

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

Conversation

tannisroot
Copy link

@tannisroot tannisroot commented Aug 23, 2024

wyoming-whisper-cpp does something similar, but I've encountered far more non-speech tokens than just [BLANK AUDIO] so this change instead just removes square and round brackets and their contents altogether.
https://github.com/rhasspy/wyoming-whisper-cpp/blob/476b0e631392034a94196eb578b3d0a60164af53/wyoming_whisper_cpp/handler.py#L92

@tannisroot tannisroot changed the title Remove [BLANK AUDIO] from output Remove non-speech descriptions from output Sep 3, 2024
@StrandmonYellow
Copy link

Is this already merged?

@tannisroot
Copy link
Author

Is this already merged?

the status of the PR is open so no

@ser
Copy link
Owner

ser commented Oct 21, 2024

Hello would you please do it in one regexp and add appropriate comments what is that thingy doing into the code? and maybe it's worth to make it as an option?

text = re.sub(r'\[.*?\]|\(.*?\)', '', text).strip()

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.

3 participants