@@ -21,12 +21,11 @@ module Whisper
2121 def self.lang_str : (Integer id) -> String
2222 def self.lang_str_full : (Integer id) -> String
2323 def self.log_set : (log_callback, Object? user_data) -> log_callback
24- def self.finalize_log_callback : (void ) -> void # Second argument of ObjectSpace.define_finalizer
2524
2625 class Context
2726 def initialize : (string | _ToPath | ::URI::HTTP) -> void
28- def transcribe : (string, Params) -> void
29- | (string, Params) { (String) -> void } -> void
27+ def transcribe : (string, Params) -> self
28+ | (string, Params) { (String) -> void } -> self
3029 def model_n_vocab : () -> Integer
3130 def model_n_audio_ctx : () -> Integer
3231 def model_n_audio_state : () -> Integer
@@ -35,21 +34,22 @@ module Whisper
3534 def model_n_mels : () -> Integer
3635 def model_ftype : () -> Integer
3736 def model_type : () -> String
37+ def each_segment : { (Segment) -> void } -> void
38+ | () -> Enumerator[Segment]
39+ def model : () -> Model
40+ def full_get_segment : (Integer nth) -> Segment
3841 def full_n_segments : () -> Integer
3942 def full_lang_id : () -> Integer
4043 def full_get_segment_t0 : (Integer) -> Integer
4144 def full_get_segment_t1 : (Integer) -> Integer
4245 def full_get_segment_speaker_turn_next : (Integer) -> (true | false)
4346 def full_get_segment_text : (Integer) -> String
4447 def full_get_segment_no_speech_prob : (Integer) -> Float
45- def full : (Params, Array[Float] samples, ?Integer n_samples) -> void
46- | (Params, _Samples, ?Integer n_samples) -> void
47- def full_parallel : (Params, Array[Float], ?Integer n_samples) -> void
48- | (Params, _Samples, ?Integer n_samples) -> void
48+ def full : (Params, Array[Float] samples, ?Integer n_samples) -> self
49+ | (Params, _Samples, ?Integer n_samples) -> self
50+ def full_parallel : (Params, Array[Float], ?Integer n_samples) -> self
51+ | (Params, _Samples, ?Integer n_samples) -> self
4952 | (Params, _Samples, ?Integer? n_samples, Integer n_processors) -> void
50- def each_segment : { (Segment) -> void } -> void
51- | () -> Enumerator[Segment]
52- def model : () -> Model
5353 end
5454
5555 class Params
0 commit comments