1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Vapi API
*
* Voice AI for developers.
*
* The version of the OpenAPI document: 1.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FourierDenoisingPlan {
/// Whether Fourier denoising is enabled. Note that this is experimental and may not work as expected.
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// Whether automatic media detection is enabled. When enabled, the filter will automatically detect consistent background TV/music/radio and switch to more aggressive filtering settings. Only applies when enabled is true.
#[serde(
rename = "mediaDetectionEnabled",
skip_serializing_if = "Option::is_none"
)]
pub media_detection_enabled: Option<bool>,
/// Static threshold in dB used as fallback when no baseline is established.
#[serde(rename = "staticThreshold", skip_serializing_if = "Option::is_none")]
pub static_threshold: Option<f64>,
/// How far below the rolling baseline to filter audio, in dB. Lower values (e.g., -10) are more aggressive, higher values (e.g., -20) are more conservative.
#[serde(rename = "baselineOffsetDb", skip_serializing_if = "Option::is_none")]
pub baseline_offset_db: Option<f64>,
/// Rolling window size in milliseconds for calculating the audio baseline. Larger windows adapt more slowly but are more stable.
#[serde(rename = "windowSizeMs", skip_serializing_if = "Option::is_none")]
pub window_size_ms: Option<f64>,
/// Percentile to use for baseline calculation (1-99). Higher percentiles (e.g., 85) focus on louder speech, lower percentiles (e.g., 50) include quieter speech.
#[serde(rename = "baselinePercentile", skip_serializing_if = "Option::is_none")]
pub baseline_percentile: Option<f64>,
}
impl FourierDenoisingPlan {
pub fn new() -> FourierDenoisingPlan {
FourierDenoisingPlan {
enabled: None,
media_detection_enabled: None,
static_threshold: None,
baseline_offset_db: None,
window_size_ms: None,
baseline_percentile: None,
}
}
}