rust_ai/azure/types/speech/
mode.rs

1use serde::{Deserialize, Serialize};
2
3/// The mode used for punctuation.
4#[derive(Clone, Debug, Deserialize, Serialize)]
5pub enum PunctuationMode {
6    /// No punctuation.
7    None,
8
9    /// Dictated punctuation marks only, i.e., explicit punctuation.
10    Dictated,
11
12    /// Automatic punctuation.
13    Automatic,
14
15    /// Dictated punctuation marks or automatic punctuation.
16    DictatedAndAutomatic,
17}
18
19impl Into<String> for PunctuationMode {
20    fn into(self) -> String {
21        (match self {
22            Self::None => "None",
23            Self::Dictated => "Dictated",
24            Self::Automatic => "Automatic",
25            Self::DictatedAndAutomatic => "DictatedAndAutomatic",
26        })
27        .into()
28    }
29}
30
31/// ProfanityFilterMode
32#[derive(Clone, Debug, Deserialize, Serialize)]
33pub enum ProfanityFilterMode {
34    /// Disable profanity filtering.
35    None,
36
37    /// Remove profanity.
38    Removed,
39
40    /// Add "profanity" XML tags</Profanity>
41    Tags,
42
43    /// Mask the profanity with * except of the first letter, e.g., f***
44    Masked,
45}
46
47impl Into<String> for ProfanityFilterMode {
48    fn into(self) -> String {
49        (match self {
50            Self::None => "None",
51            Self::Removed => "Removed",
52            Self::Tags => "Tags",
53            Self::Masked => "Masked",
54        })
55        .into()
56    }
57}