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

bug: params.with_max_segment_length(1) doesn't produce word-level segments #92

Open
ProfHercules opened this issue Apr 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ProfHercules
Copy link

Describe the bug

Given this code:

model = w.Whisper.from_pretrained("tiny")
params = model.params.with_max_segment_length(1).build()

samples = [] # np.array of samples from pydub
model.context.full(params, samples)
for s in range(model.context.full_n_segments()):
    print(model.context.full_get_segment_text(s))

I would expect the output to be individual segments, but instead I just get normal sentences.
It doesn't seem like with_max_segment_length makes any difference.

I may be misunderstanding some things - my main goal is to just get word-level timestamps by outputting individual words.

To reproduce

No response

Expected behavior

No response

Environment

python: 3.11
platform: MacOS 13.3

@ProfHercules ProfHercules added the bug Something isn't working label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant