pub struct TextToAudioRequest<N>{
pub key: String,
/* private fields */
}Expand description
Text-to-speech request wrapper using JSON body
Fields§
§key: StringImplementations§
Source§impl<N> TextToAudioRequest<N>
impl<N> TextToAudioRequest<N>
pub fn new(model: N, key: String) -> Self
pub fn body_mut(&mut self) -> &mut TextToAudioBody<N>
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> HttpClient for TextToAudioRequest<N>
impl<N> HttpClient for TextToAudioRequest<N>
type Body = TextToAudioBody<N>
type ApiUrl = &'static str
type ApiKey = String
fn api_url(&self) -> &Self::ApiUrl
fn api_key(&self) -> &Self::ApiKey
fn body(&self) -> &Self::Body
Source§fn http_config(&self) -> Arc<HttpClientConfig> ⓘ
fn http_config(&self) -> Arc<HttpClientConfig> ⓘ
Get HTTP client configuration for this request Read more
Auto Trait Implementations§
impl<N> Freeze for TextToAudioRequest<N>where
N: Freeze,
impl<N> RefUnwindSafe for TextToAudioRequest<N>where
N: RefUnwindSafe,
impl<N> Send for TextToAudioRequest<N>where
N: Send,
impl<N> Sync for TextToAudioRequest<N>where
N: Sync,
impl<N> Unpin for TextToAudioRequest<N>where
N: Unpin,
impl<N> UnsafeUnpin for TextToAudioRequest<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for TextToAudioRequest<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