Skip to content

Commit 0ed5b23

Browse files
committed
Add headings to API section in README [skip ci]
1 parent 9e50697 commit 0ed5b23

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

bindings/ruby/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ See [models][] page for details.
9191

9292
Currently, whisper.cpp accepts only 16-bit WAV files.
9393

94-
### API ###
94+
API
95+
---
96+
97+
### Segments ###
9598

9699
Once `Whisper::Context#transcribe` called, you can retrieve segments by `#each_segment`:
97100

@@ -143,6 +146,8 @@ whisper.transcribe("path/to/audio.wav", params)
143146

144147
```
145148

149+
### Models ###
150+
146151
You can see model information:
147152

148153
```ruby
@@ -164,6 +169,8 @@ model.type # => "base"
164169

165170
```
166171

172+
### Logging ###
173+
167174
You can set log callback:
168175

169176
```ruby
@@ -196,6 +203,8 @@ Whisper.log_set ->(level, buffer, user_data) {
196203
Whisper::Context.new(MODEL)
197204
```
198205

206+
### Low-level API to transcribe ###
207+
199208
You can also call `Whisper::Context#full` and `#full_parallel` with a Ruby array as samples. Although `#transcribe` with audio file path is recommended because it extracts PCM samples in C++ and is fast, `#full` and `#full_parallel` give you flexibility.
200209

201210
```ruby

0 commit comments

Comments
 (0)