]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ruby : add `Whisper::Context::Params`, fix token memory management (#3647)
authorKITAITI Makoto <redacted>
Wed, 4 Feb 2026 11:33:09 +0000 (20:33 +0900)
committerGitHub <redacted>
Wed, 4 Feb 2026 11:33:09 +0000 (20:33 +0900)
commit941bdabbe4561bc6de68981aea01bc5ab05781c5
treecfe612bd5533703ac65faf6963265fd4daf706c7
parentaa1bc0d1a6dfd70dbb9f60c11df12441e03a9075
ruby : add `Whisper::Context::Params`, fix token memory management (#3647)

* Don't convert to temporary VALUE

* Define Whisper::Context::Params

* Add test for Whisper::Context::Params

* Implement Whisper::Context::Params

* Add tests for Context::Params

* Fix Whisper::Token memory management

* Add test for token_timestamps

* Make Context accept Context::Params

* Make Context::Params.new accept keyword args

* Add test for Context::Params.new with keyword args

* Add signature of Context::Params

* Add example for Whisper::Token

* Fix typos

* Revert "Don't convert to temporary VALUE"

This reverts commit dee66e738491ae742fc981dc6e18ad92f1b05316.

* Hold Token#text as Ruby objectd

* Don't use pointer for ruby_whisper_context_params.params

* Use RUBY_DEFAULT_FREE instead of custom function

* Update bindings/ruby/README.md

Co-authored-by: Daniel Bevenius <redacted>
* Add document for Whisper::Context::Params

---------

Co-authored-by: Daniel Bevenius <redacted>
bindings/ruby/README.md
bindings/ruby/ext/ruby_whisper.c
bindings/ruby/ext/ruby_whisper.h
bindings/ruby/ext/ruby_whisper_context.c
bindings/ruby/ext/ruby_whisper_context_params.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_token.c
bindings/ruby/sig/whisper.rbs
bindings/ruby/test/test_context_params.rb [new file with mode: 0644]
bindings/ruby/test/test_token.rb