transcribe_cpp_types/
model.rs1use crate::types::{KvType, TimestampKind};
5
6#[derive(Debug, Clone, PartialEq)]
8#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
9pub struct Capabilities {
10 pub native_sample_rate: i32,
11 pub languages: Vec<String>,
13 pub translate_target_languages: Vec<String>,
15 pub max_timestamp_kind: TimestampKind,
17 pub supports_language_detect: bool,
18 pub supports_translate: bool,
19 pub supports_streaming: bool,
20 pub supports_spec_decode: bool,
21 pub max_audio_ms: i64,
23}
24
25#[derive(Debug, Clone, PartialEq, Eq)]
27#[cfg_attr(
28 feature = "serde",
29 derive(serde::Serialize, serde::Deserialize),
30 serde(default)
31)]
32pub struct SessionOptions {
33 pub n_threads: i32,
35 pub kv_type: KvType,
37 pub n_ctx: i32,
39}
40
41impl Default for SessionOptions {
42 fn default() -> Self {
43 SessionOptions {
44 n_threads: 0,
45 kv_type: KvType::Auto,
46 n_ctx: 0,
47 }
48 }
49}
50
51#[derive(Debug, Clone, Copy, PartialEq, Eq)]
53#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
54pub struct SessionLimits {
55 pub effective_n_ctx: i32,
57 pub effective_max_audio_ms: i64,
59 pub max_kv_bytes: i64,
61}