@@ -23,7 +23,7 @@ module Whisper
2323 def self.log_set : (log_callback, Object? user_data) -> log_callback
2424
2525 class Context
26- def initialize : (string | _ToPath | ::URI::HTTP) -> void
26+ def self.new : (string | _ToPath | ::URI::HTTP) -> instance
2727 def transcribe : (string, Params) -> self
2828 | (string, Params) { (String) -> void } -> self
2929 def model_n_vocab : () -> Integer
@@ -53,7 +53,7 @@ module Whisper
5353 end
5454
5555 class Params
56- def initialize : (
56+ def self.new : (
5757 ?language: string,
5858 ?translate: boolish,
5959 ?no_context: boolish,
@@ -84,7 +84,7 @@ module Whisper
8484 ?progress_callback_user_data: Object,
8585 ?abort_callback: abort_callback,
8686 ?abort_callback_user_data: Object
87- ) -> void
87+ ) -> instance
8888 def language= : (String) -> String # TODO: Enumerate lang names
8989 def language : () -> String
9090 def translate= : (boolish) -> boolish
@@ -152,7 +152,7 @@ module Whisper
152152
153153 class Model
154154 def self.pre_converted_models : () -> Hash[String, Model::URI]
155- def initialize : () -> void
155+ def self.new : () -> instance
156156 def n_vocab : () -> Integer
157157 def n_audio_ctx : () -> Integer
158158 def n_audio_state : () -> Integer
@@ -167,14 +167,13 @@ module Whisper
167167 def type : () -> String
168168
169169 class URI
170- def initialize : (string | ::URI::HTTP) -> void
170+ def self.new : (string | ::URI::HTTP) -> self
171171 def to_path : -> String
172172 def clear_cache : -> void
173173 end
174174 end
175175
176176 class Segment
177- def initialize : () -> void
178177 def start_time : () -> Integer
179178 def end_time : () -> Integer
180179 def speaker_next_turn? : () -> (true | false)
@@ -185,6 +184,6 @@ module Whisper
185184 class Error < StandardError
186185 attr_reader code: Integer
187186
188- def initialize : (Integer code) -> void
187+ def self.new : (Integer code) -> instance
189188 end
190189end
0 commit comments