2024-12-30 21:26:35 +09:00
|
|
|
#ifndef RUBY_WHISPER_H
|
|
|
|
#define RUBY_WHISPER_H
|
2023-02-15 12:46:55 -05:00
|
|
|
|
|
|
|
#include "whisper.h"
|
|
|
|
|
2024-10-28 22:43:27 +09:00
|
|
|
typedef struct {
|
|
|
|
VALUE *context;
|
|
|
|
VALUE user_data;
|
|
|
|
VALUE callback;
|
|
|
|
VALUE callbacks;
|
|
|
|
} ruby_whisper_callback_container;
|
|
|
|
|
2023-02-15 12:46:55 -05:00
|
|
|
typedef struct {
|
|
|
|
struct whisper_context *context;
|
|
|
|
} ruby_whisper;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
struct whisper_full_params params;
|
|
|
|
bool diarize;
|
2024-10-28 22:43:27 +09:00
|
|
|
ruby_whisper_callback_container *new_segment_callback_container;
|
2024-10-29 02:23:23 +09:00
|
|
|
ruby_whisper_callback_container *progress_callback_container;
|
|
|
|
ruby_whisper_callback_container *abort_callback_container;
|
2023-02-15 12:46:55 -05:00
|
|
|
} ruby_whisper_params;
|
|
|
|
|
2025-01-21 16:39:54 +09:00
|
|
|
typedef struct {
|
|
|
|
VALUE context;
|
|
|
|
int index;
|
|
|
|
} ruby_whisper_segment;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
VALUE context;
|
|
|
|
} ruby_whisper_model;
|
|
|
|
|
2023-02-15 12:46:55 -05:00
|
|
|
#endif
|