mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2025-09-15 13:28:35 +08:00
* Fix type signature for Whisper.log_set
* Use cache file for model when offline
* Extract ruby_whisper_transcribe() into a file
* Extract Whisper::Error
* Use FileList for ext/*.{c,cpp,h}
* Extract Whisper::Segment
* Extract Whisper::Model
* Extract Whisper::Params
* Extract Whisper::Context
* Extract log_callback function
* Write base code in C rather than C++
* Use chdir instead of Dir.chdir in Rakefile
* Define alloc func for Whisper::Model
* Define Whisper::Params' calback and user data reader
* Add test for Whisper::Params.new with keyword arguments
* Make Whisper::Params.new accept keyword arguments
* Update type signatures
* Update README
* Update CLEAN targets
* Fix document comment for Whisper::Params#new_segment_callback=
* Use macro to define params
* Fix dependency of build task
* Set Whisper.finalize_log_callback visibility to private
* Make Whisper::Context#full and full_parallel return self
* Add test for Whisper::Context#full_get_segment
* Add Whisper::Context#full_get_segment
* Update signatures
* Update README
* Fix signature
* Resplace #initialize with .new in signature file [skip ci]
* Fix potential overflow
35 lines
687 B
C
35 lines
687 B
C
#ifndef RUBY_WHISPER_H
|
|
#define RUBY_WHISPER_H
|
|
|
|
#include "whisper.h"
|
|
|
|
typedef struct {
|
|
VALUE *context;
|
|
VALUE user_data;
|
|
VALUE callback;
|
|
VALUE callbacks;
|
|
} ruby_whisper_callback_container;
|
|
|
|
typedef struct {
|
|
struct whisper_context *context;
|
|
} ruby_whisper;
|
|
|
|
typedef struct {
|
|
struct whisper_full_params params;
|
|
bool diarize;
|
|
ruby_whisper_callback_container *new_segment_callback_container;
|
|
ruby_whisper_callback_container *progress_callback_container;
|
|
ruby_whisper_callback_container *abort_callback_container;
|
|
} ruby_whisper_params;
|
|
|
|
typedef struct {
|
|
VALUE context;
|
|
int index;
|
|
} ruby_whisper_segment;
|
|
|
|
typedef struct {
|
|
VALUE context;
|
|
} ruby_whisper_model;
|
|
|
|
#endif
|