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

Split segment to words #30

Closed
chichiller opened this issue Oct 24, 2023 · 1 comment
Closed

Split segment to words #30

chichiller opened this issue Oct 24, 2023 · 1 comment

Comments

@chichiller
Copy link

chichiller commented Oct 24, 2023

At first thank you for your job
i have a question: when i transcribe audio file as PCM [Float] i receive as result [Segment]
i noticed that each Segment may contain not separate word, but sentence
how i can split sentence into separate words with timestamp for each?
I tried to use WhisperParams fields:

  1. max_len = 1
  2. split_on_word = true

but result always the same
The only thing is help me decrease words in sentence is using beamSearch strategy, but i still get sentence instead of separate words

my code

let params = WhisperParams(strategy: .beamSearch)
params.max_len = 1
params.split_on_word = true
whisper = Whisper(fromFileURL: modelUrl, withParams: params)
@exPHAT
Copy link
Owner

exPHAT commented Oct 24, 2023

You can see the correct usage in #6

@exPHAT exPHAT closed this as completed Oct 24, 2023
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

2 participants