69 lines
1.6 KiB
C
69 lines
1.6 KiB
C
#ifndef VOICE_CONFIG_H
|
|
#define VOICE_CONFIG_H
|
|
|
|
#include <stddef.h>
|
|
|
|
typedef struct {
|
|
char model_path[512];
|
|
char audio_device[256];
|
|
char language[32];
|
|
char hotkey[64];
|
|
int use_gpu;
|
|
int sample_rate;
|
|
int type_delay_us;
|
|
int max_record_seconds;
|
|
int always_on;
|
|
int always_on_window_ms;
|
|
float vad_peak_threshold;
|
|
int vad_trigger_ms;
|
|
int vad_release_ms;
|
|
int vad_preroll_ms;
|
|
int vad_min_speech_ms;
|
|
int vad_max_speech_ms;
|
|
int autotype_enabled;
|
|
int filter_bracketed_tags;
|
|
|
|
int whisper_sampling_strategy; // 0=greedy, 1=beam search
|
|
int whisper_n_max_text_ctx;
|
|
int whisper_offset_ms;
|
|
int whisper_duration_ms;
|
|
|
|
int whisper_translate;
|
|
int whisper_detect_language;
|
|
int whisper_no_context;
|
|
int whisper_no_timestamps;
|
|
int whisper_single_segment;
|
|
|
|
int whisper_token_timestamps;
|
|
float whisper_thold_pt;
|
|
float whisper_thold_ptsum;
|
|
int whisper_max_len;
|
|
int whisper_split_on_word;
|
|
int whisper_max_tokens;
|
|
|
|
int whisper_audio_ctx;
|
|
int whisper_tdrz_enable;
|
|
|
|
int whisper_suppress_blank;
|
|
int whisper_suppress_nst;
|
|
|
|
float whisper_temperature;
|
|
float whisper_max_initial_ts;
|
|
float whisper_length_penalty;
|
|
|
|
float whisper_temperature_inc;
|
|
float whisper_entropy_thold;
|
|
float whisper_logprob_thold;
|
|
float whisper_no_speech_thold;
|
|
|
|
int whisper_greedy_best_of;
|
|
int whisper_beam_size;
|
|
float whisper_beam_patience;
|
|
} voice_config_t;
|
|
|
|
void config_set_defaults(voice_config_t *cfg);
|
|
int config_load_file(const char *path, voice_config_t *cfg);
|
|
int config_save_file(const char *path, const voice_config_t *cfg);
|
|
|
|
#endif
|