pub struct AudioPart {
    pub data: String,
    pub format: AudioFormat,
    pub sample_rate: Option<u32>,
    pub channels: Option<u32>,
    pub transcript: Option<String>,
    pub id: Option<String>,
}Expand description
A part of the message that contains an audio.
Fields§
§data: StringThe base64-encoded audio data.
format: AudioFormatThe format of the audio.
sample_rate: Option<u32>The sample rate of the audio. E.g. 44100, 48000.
channels: Option<u32>The number of channels of the audio. E.g. 1, 2.
transcript: Option<String>The transcript of the audio.
id: Option<String>The ID of the audio part, if applicable
Implementations§
Source§impl AudioPart
 
impl AudioPart
pub fn new(data: impl Into<String>, format: AudioFormat) -> Self
pub fn with_sample_rate(self, rate: u32) -> Self
pub fn with_channels(self, channels: u32) -> Self
pub fn with_transcript(self, transcript: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AudioPart
 
impl<'de> Deserialize<'de> for AudioPart
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AudioPart
Auto Trait Implementations§
impl Freeze for AudioPart
impl RefUnwindSafe for AudioPart
impl Send for AudioPart
impl Sync for AudioPart
impl Unpin for AudioPart
impl UnwindSafe for AudioPart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more