Skip to content

Commit 8f3f43e

Browse files
committed
Add document on Whisper::Model
1 parent 411de38 commit 8f3f43e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

bindings/ruby/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,27 @@ whisper.transcribe("path/to/audio.wav", params)
107107

108108
```
109109

110+
You can see model information:
111+
112+
```ruby
113+
whisper = Whisper::Context.new("path/to/model.bin")
114+
model = whisper.model
115+
116+
model.n_vocab # 51864
117+
model.n_audio_ctx # => 1500
118+
model.n_audio_state # => 512
119+
model.n_audio_head # => 8
120+
model.n_audio_layer # => 6
121+
model.n_text_ctx # => 448
122+
model.n_text_state # => 512
123+
model.n_text_head # => 8
124+
model.n_text_layer # => 6
125+
model.n_mels # => 80
126+
model.ftype # => 1
127+
model.type # => "base"
128+
129+
```
130+
110131
You can set log callback:
111132

112133
```ruby

0 commit comments

Comments
 (0)