mirror of
https://github.com/ggerganov/whisper.cpp
synced 2026-04-17 12:25:42 +02:00
* Add Whisper::VAD::Context * Add test for Whisper::VAD::Context * Add Whisper::VAD::Segment * Add Whisper::VAD::Segments * Add Whisper::VAD::Context#detect * Define Whisper::VAD::Segments#each * Define Whisper::VAD::Segment#start_time and #end_time * Define Whisper::VAD::Segment#deconstruct_keys * Add tests for Whisper::VAD family * Add signatures for VAD family * Add document on VAD in README * Define Whisper::VAD::Segments#length * Add test for Whisper::VAD::Segments#length * Add signature of Segments#length * Make vad_segments responsible to initialize VAD::Segments * Remove meaningless argument check * Check NULL of segments member * Add tests for Whisper::VAD::Segments * Initialize Whisper::VAD::Segment on .allocate * Add tests for Whisper::VAD::Segment * Check NULL of context member * Add test for Whisper::VAD::Context.allocate
54 lines
1.1 KiB
C
54 lines
1.1 KiB
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 *encoder_begin_callback_container;
|
|
ruby_whisper_callback_container *abort_callback_container;
|
|
VALUE vad_params;
|
|
} ruby_whisper_params;
|
|
|
|
typedef struct {
|
|
struct whisper_vad_params params;
|
|
} ruby_whisper_vad_params;
|
|
|
|
typedef struct {
|
|
VALUE context;
|
|
int index;
|
|
} ruby_whisper_segment;
|
|
|
|
typedef struct {
|
|
VALUE context;
|
|
} ruby_whisper_model;
|
|
|
|
typedef struct {
|
|
struct whisper_vad_segments *segments;
|
|
} ruby_whisper_vad_segments;
|
|
|
|
typedef struct {
|
|
VALUE segments;
|
|
int index;
|
|
} ruby_whisper_vad_segment;
|
|
|
|
typedef struct {
|
|
struct whisper_vad_context *context;
|
|
} ruby_whisper_vad_context;
|
|
|
|
#endif
|