pub struct Speech<'c, C: Config> { /* private fields */ }Implementations§
Source§impl<'c, C: Config> Speech<'c, C>
impl<'c, C: Config> Speech<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn create(
&self,
request: CreateSpeechRequest,
) -> Result<CreateSpeechResponse, OpenAIError>
pub async fn create( &self, request: CreateSpeechRequest, ) -> Result<CreateSpeechResponse, OpenAIError>
Generates audio from the input text.
Sourcepub async fn create_stream(
&self,
request: CreateSpeechRequest,
) -> Result<SpeechResponseStream, OpenAIError>
pub async fn create_stream( &self, request: CreateSpeechRequest, ) -> Result<SpeechResponseStream, OpenAIError>
Generates audio from the input text in SSE stream format. Generates audio from the input text in SSE stream format.
Sourcepub async fn create_stream_byot<T0: Serialize, R>(
&self,
request: T0,
) -> Result<Pin<Box<dyn Stream<Item = Result<R, OpenAIError>> + Send>>, OpenAIError>where
R: Send + 'static + DeserializeOwned,
pub async fn create_stream_byot<T0: Serialize, R>(
&self,
request: T0,
) -> Result<Pin<Box<dyn Stream<Item = Result<R, OpenAIError>> + Send>>, OpenAIError>where
R: Send + 'static + DeserializeOwned,
Generates audio from the input text in SSE stream format.
Auto Trait Implementations§
impl<'c, C> Freeze for Speech<'c, C>
impl<'c, C> !RefUnwindSafe for Speech<'c, C>
impl<'c, C> Send for Speech<'c, C>
impl<'c, C> Sync for Speech<'c, C>
impl<'c, C> Unpin for Speech<'c, C>
impl<'c, C> !UnwindSafe for Speech<'c, C>
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