async_llm/types/
chat_audio.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
4#[serde(rename_all = "snake_case")]
5pub enum ChatAudioVoice {
6    Alloy,
7    Ash,
8    Ballad,
9    Coral,
10    Echo,
11    Sage,
12    Shimmer,
13    Verse,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
17#[serde(rename_all = "snake_case")]
18pub enum ChatAudioFormat {
19    Wav,
20    Mp3,
21    Flac,
22    Opus,
23    Pcm16,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
27pub struct ChatAudio {
28    /// The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).
29    pub voice: ChatAudioVoice,
30    /// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
31    pub format: ChatAudioFormat,
32}