pub struct TextToAudioBody<N>{
pub model: N,
pub input: Option<String>,
pub voice: Option<Voice>,
pub speed: Option<f32>,
pub volume: Option<f32>,
pub response_format: Option<TtsAudioFormat>,
pub watermark_enabled: Option<bool>,
}Fields§
§model: NTTS model (e.g., cogtts)
input: Option<String>Text to convert to speech (max 4096)
voice: Option<Voice>Voice preset
speed: Option<f32>Speed in [0.5, 2]
volume: Option<f32>Volume in (0, 10]; we validate as [0.0, 10.0] for simplicity
response_format: Option<TtsAudioFormat>Output audio format
watermark_enabled: Option<bool>Watermark toggle
Implementations§
Source§impl<N> TextToAudioBody<N>
impl<N> TextToAudioBody<N>
pub fn new(model: N) -> Self
pub fn with_input(self, input: impl Into<String>) -> Self
pub fn with_voice(self, voice: Voice) -> Self
pub fn with_speed(self, speed: f32) -> Self
pub fn with_volume(self, volume: f32) -> Self
pub fn with_response_format(self, fmt: TtsAudioFormat) -> Self
pub fn with_watermark_enabled(self, enabled: bool) -> Self
Trait Implementations§
Source§impl<N> Clone for TextToAudioBody<N>
impl<N> Clone for TextToAudioBody<N>
Source§fn clone(&self) -> TextToAudioBody<N>
fn clone(&self) -> TextToAudioBody<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N> Debug for TextToAudioBody<N>
impl<N> Debug for TextToAudioBody<N>
Source§impl<N> Serialize for TextToAudioBody<N>
impl<N> Serialize for TextToAudioBody<N>
Source§impl<N> Validate for TextToAudioBody<N>
impl<N> Validate for TextToAudioBody<N>
Source§impl<'v_a, N> ValidateArgs<'v_a> for TextToAudioBody<N>
impl<'v_a, N> ValidateArgs<'v_a> for TextToAudioBody<N>
Auto Trait Implementations§
impl<N> Freeze for TextToAudioBody<N>where
N: Freeze,
impl<N> RefUnwindSafe for TextToAudioBody<N>where
N: RefUnwindSafe,
impl<N> Send for TextToAudioBody<N>where
N: Send,
impl<N> Sync for TextToAudioBody<N>where
N: Sync,
impl<N> Unpin for TextToAudioBody<N>where
N: Unpin,
impl<N> UnsafeUnpin for TextToAudioBody<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for TextToAudioBody<N>where
N: UnwindSafe,
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