Skip to main content

mistral_openapi_client/models/
audio_encoding.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum AudioEncoding {
17    #[serde(rename = "pcm_s16le")]
18    PcmS16le,
19    #[serde(rename = "pcm_s32le")]
20    PcmS32le,
21    #[serde(rename = "pcm_f16le")]
22    PcmF16le,
23    #[serde(rename = "pcm_f32le")]
24    PcmF32le,
25    #[serde(rename = "pcm_mulaw")]
26    PcmMulaw,
27    #[serde(rename = "pcm_alaw")]
28    PcmAlaw,
29
30}
31
32impl std::fmt::Display for AudioEncoding {
33    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
34        match self {
35            Self::PcmS16le => write!(f, "pcm_s16le"),
36            Self::PcmS32le => write!(f, "pcm_s32le"),
37            Self::PcmF16le => write!(f, "pcm_f16le"),
38            Self::PcmF32le => write!(f, "pcm_f32le"),
39            Self::PcmMulaw => write!(f, "pcm_mulaw"),
40            Self::PcmAlaw => write!(f, "pcm_alaw"),
41        }
42    }
43}
44
45impl Default for AudioEncoding {
46    fn default() -> AudioEncoding {
47        Self::PcmS16le
48    }
49}
50