From 83237e23032c1f2bef8193d9b140d48a9d33aeb6 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 26 Apr 2026 03:41:04 +0900 Subject: [PATCH] Specify implicity Whisper::Params to distinguish from Whisper::Context::Params --- bindings/ruby/sig/whisper.rbs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bindings/ruby/sig/whisper.rbs b/bindings/ruby/sig/whisper.rbs index 94bee4b5..a7bf44e7 100644 --- a/bindings/ruby/sig/whisper.rbs +++ b/bindings/ruby/sig/whisper.rbs @@ -55,8 +55,8 @@ module Whisper # If `n_processors` is greater than 1, you cannot set any callbacks including # new_segment_callback, progress_callback, encoder_begin_callback, abort_callback, # and log_callback set by Whisper.log_set - def transcribe: (path, Params, ?n_processors: Integer) -> self - | (path, Params, ?n_processors: Integer) { (String) -> void } -> self + def transcribe: (path, Whisper::Params, ?n_processors: Integer) -> self + | (path, Whisper::Params, ?n_processors: Integer) { (String) -> void } -> self def model_n_vocab: () -> Integer def model_n_audio_ctx: () -> Integer @@ -123,8 +123,8 @@ module Whisper # # The second argument `samples` must be an array of samples, respond to `:length`, or be a MemoryView of an array of float. It must be 32 bit float PCM audio data. # - def full: (Params, Array[Float] samples, ?Integer n_samples) -> self - | (Params, _Samples, ?Integer n_samples) -> self + def full: (Whisper::Params, Array[Float] samples, ?Integer n_samples) -> self + | (Whisper::Params, _Samples, ?Integer n_samples) -> self # Split the input audio in chunks and process each chunk separately using `whisper_full_with_state()` # Result is stored in the default state of the context @@ -135,9 +135,8 @@ module Whisper # If `n_processors` is greater than 1, you cannot set any callbacks including # new_segment_callback, progress_callback, encoder_begin_callback, abort_callback, # and log_callback set by Whisper.log_set - def full_parallel: (Params, Array[Float], ?Integer n_samples) -> self - | (Params, _Samples, ?Integer n_samples) -> self - | (Params, _Samples, ?Integer? n_samples, Integer n_processors) -> self + def full_parallel: (Whisper::Params, Array[Float], ?Integer n_samples) -> self + | (Whisper::Params, _Samples, ?Integer n_samples) -> self def to_srt: () -> String def to_webvtt: () -> String