1#![allow(clippy::uninlined_format_args)]
2#![cfg_attr(test, feature(test))]
3
4#[cfg(feature = "vulkan")]
10pub mod vulkan;
11
12mod common_logging;
13mod error;
14mod ggml_logging_hook;
15mod standalone;
16mod utilities;
17mod whisper_ctx;
18mod whisper_ctx_wrapper;
19mod whisper_grammar;
20mod whisper_logging_hook;
21mod whisper_params;
22mod whisper_state;
23mod whisper_vad;
24
25pub use common_logging::GGMLLogLevel;
26pub use error::WhisperError;
27pub use standalone::*;
28pub use utilities::*;
29pub use whisper_ctx::DtwMode;
30pub use whisper_ctx::DtwModelPreset;
31pub use whisper_ctx::DtwParameters;
32pub use whisper_ctx::WhisperContextParameters;
33use whisper_ctx::WhisperInnerContext;
34pub use whisper_ctx_wrapper::WhisperContext;
35pub use whisper_grammar::{WhisperGrammarElement, WhisperGrammarElementType};
36pub use whisper_params::{FullParams, SamplingStrategy, SegmentCallbackData};
37#[cfg(feature = "raw-api")]
38pub use whisper_rs_sys;
39pub use whisper_state::{WhisperSegment, WhisperState, WhisperStateSegmentIterator, WhisperToken};
40pub use whisper_vad::*;
41
42pub type WhisperSysContext = whisper_rs_sys::whisper_context;
43pub type WhisperSysState = whisper_rs_sys::whisper_state;
44
45pub type WhisperTokenData = whisper_rs_sys::whisper_token_data;
46pub type WhisperTokenId = whisper_rs_sys::whisper_token;
47pub type WhisperNewSegmentCallback = whisper_rs_sys::whisper_new_segment_callback;
48pub type WhisperStartEncoderCallback = whisper_rs_sys::whisper_encoder_begin_callback;
49pub type WhisperProgressCallback = whisper_rs_sys::whisper_progress_callback;
50pub type WhisperLogitsFilterCallback = whisper_rs_sys::whisper_logits_filter_callback;
51pub type WhisperAbortCallback = whisper_rs_sys::ggml_abort_callback;
52pub type WhisperLogCallback = whisper_rs_sys::ggml_log_callback;
53pub type DtwAhead = whisper_rs_sys::whisper_ahead;
54
55pub static WHISPER_CPP_VERSION: &str = env!("WHISPER_CPP_VERSION");
57
58pub fn install_logging_hooks() {
76 crate::whisper_logging_hook::install_whisper_logging_hook();
77 crate::ggml_logging_hook::install_ggml_logging_hook();
78}