]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ruby : Make context accept initial parameters, API to retrieve a segment and more... upstream/1.7.4+33
authorKITAITI Makoto <redacted>
Tue, 21 Jan 2025 07:39:54 +0000 (16:39 +0900)
committerGitHub <redacted>
Tue, 21 Jan 2025 07:39:54 +0000 (09:39 +0200)
commit7ffcd05267b7ff47a271961c5eec11d1a15effe8
treebdef254c44d56bcce6b679f3617bb8a0b32556c9
parent7a423f1c008c1d7efdee91e1ce2f8ae22f42f43b
ruby : Make context accept initial parameters, API to retrieve a segment and more (#2749)

* Fix type signature for Whisper.log_set

* Use cache file for model when offline

* Extract ruby_whisper_transcribe() into a file

* Extract Whisper::Error

* Use FileList for ext/*.{c,cpp,h}

* Extract Whisper::Segment

* Extract Whisper::Model

* Extract Whisper::Params

* Extract Whisper::Context

* Extract log_callback function

* Write base code in C rather than C++

* Use chdir instead of Dir.chdir in Rakefile

* Define alloc func for Whisper::Model

* Define Whisper::Params' calback and user data reader

* Add test for Whisper::Params.new with keyword arguments

* Make Whisper::Params.new accept keyword arguments

* Update type signatures

* Update README

* Update CLEAN targets

* Fix document comment for Whisper::Params#new_segment_callback=

* Use macro to define params

* Fix dependency of build task

* Set Whisper.finalize_log_callback visibility to private

* Make Whisper::Context#full and full_parallel return self

* Add test for Whisper::Context#full_get_segment

* Add Whisper::Context#full_get_segment

* Update signatures

* Update README

* Fix signature

* Resplace #initialize with .new in signature file [skip ci]

* Fix potential overflow
17 files changed:
bindings/ruby/README.md
bindings/ruby/Rakefile
bindings/ruby/ext/.gitignore
bindings/ruby/ext/extconf.rb
bindings/ruby/ext/ruby_whisper.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper.cpp [deleted file]
bindings/ruby/ext/ruby_whisper.h
bindings/ruby/ext/ruby_whisper_context.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_error.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_model.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_params.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_segment.c [new file with mode: 0644]
bindings/ruby/ext/ruby_whisper_transcribe.cpp [new file with mode: 0644]
bindings/ruby/lib/whisper/model/uri.rb
bindings/ruby/sig/whisper.rbs
bindings/ruby/tests/test_params.rb
bindings/ruby/tests/test_whisper.rb