speechmatics 0.4.0

An async rust SDK for the Speechmatics API
Documentation
/*
 * OpenAPI Template
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::realtime::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SpeakerDiarizationConfig {
    #[serde(rename = "max_speakers", skip_serializing_if = "Option::is_none")]
    pub max_speakers: Option<f64>,
    /// When set to `true`, reduces the likelihood of incorrectly switching between similar sounding speakers. See [Prefer Current Speaker](https://docs.speechmatics.com/speech-to-text/features/diarization#prefer-current-speaker). 
    #[serde(rename = "prefer_current_speaker", skip_serializing_if = "Option::is_none")]
    pub prefer_current_speaker: Option<bool>,
    #[serde(rename = "speaker_sensitivity", skip_serializing_if = "Option::is_none")]
    pub speaker_sensitivity: Option<f32>,
}

impl SpeakerDiarizationConfig {
    pub fn new() -> SpeakerDiarizationConfig {
        SpeakerDiarizationConfig {
            max_speakers: None,
            prefer_current_speaker: None,
            speaker_sensitivity: None,
        }
    }
}