Skip to content

Commit 7917c07

Browse files
committed
Add test to make Whisper::Context.new accept URI string
1 parent 83b321d commit 7917c07

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

bindings/ruby/tests/test_model.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,23 @@ def test_auto_download
6868
assert_path_exist path
6969
assert_equal 147964211, File.size(path)
7070
end
71+
72+
def test_uri_string
73+
path = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin"
74+
whisper = Whisper::Context.new(path)
75+
model = whisper.model
76+
77+
assert_equal 51864, model.n_vocab
78+
assert_equal 1500, model.n_audio_ctx
79+
assert_equal 512, model.n_audio_state
80+
assert_equal 8, model.n_audio_head
81+
assert_equal 6, model.n_audio_layer
82+
assert_equal 448, model.n_text_ctx
83+
assert_equal 512, model.n_text_state
84+
assert_equal 8, model.n_text_head
85+
assert_equal 6, model.n_text_layer
86+
assert_equal 80, model.n_mels
87+
assert_equal 1, model.ftype
88+
assert_equal "base", model.type
89+
end
7190
end

0 commit comments

Comments
 (0)