Add Parakeet section to README

This commit is contained in:
Kitaiti Makoto 2026-05-21 01:30:16 +09:00
parent 451fe6be4d
commit 1d5e7e2433
1 changed files with 33 additions and 0 deletions

View File

@ -396,6 +396,39 @@ whisper
.full(Whisper::Params.new, samples)
```
### Parakeet ###
Now whispercpp supports NVIDIA's ASR model Parakeet.
If you want to use Parakeet instead of Whisper, the API should feel familiar.
In most cases, replace `Whisper::Context` and `Whisper::Params` with `Whisper::Parakeet::Context` and `Whisper::Parakeet::Params`, then use `#transcribe`, `#full`, `#each_segment`, and `#each_token` in the same way.
```ruby
require "whisper"
# It's useful to assign Whisper::Parakeet to top-level Parakeet constant unless you use Parakeet gem.
Parakeet = Whisper::Parakeet
parakeet = Parakeet::Context.new("path/to/model")
params = Parakeet::Params.new(
no_context: true,
chunk_length_ms: 10_000
)
parakeet
.transcribe("path/to/audio.wav", params)
.each_segment do |segment|
puts "[#{segment.start_time} --> #{segment.end_time}] #{segment.text}"
end
```
The main differences are:
* Namespace is `Whisper::Parakeet`.
* `Whisper::Parakeet::Params` has Parakeet-specific chunk and context settings such as `chunk_length_ms`, `left_context_ms`, and `right_context_ms`.
* Parakeet also supports `on_new_token` / `new_token_callback` in addition to segment and progress callbacks.
Custom context params
---------------------