pub struct GoogleSpeechModel { /* private fields */ }Expand description
Text-to-speech model backed by the Gemini TTS models.
Implementations§
Source§impl GoogleSpeechModel
impl GoogleSpeechModel
Sourcepub fn new(config: SharedConfig, model_id: impl Into<ModelId>) -> Self
pub fn new(config: SharedConfig, model_id: impl Into<ModelId>) -> Self
Creates the model.
Sourcepub fn prepare_request(
&self,
options: &SpeechOptions,
) -> Result<PreparedSpeechRequest, ProviderError>
pub fn prepare_request( &self, options: &SpeechOptions, ) -> Result<PreparedSpeechRequest, ProviderError>
Builds the request body for options.
§Errors
Returns ProviderError::InvalidArgument for invalid provider options.
Trait Implementations§
Source§impl Clone for GoogleSpeechModel
impl Clone for GoogleSpeechModel
Source§fn clone(&self) -> GoogleSpeechModel
fn clone(&self) -> GoogleSpeechModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GoogleSpeechModel
impl Debug for GoogleSpeechModel
Source§impl SpeechModel for GoogleSpeechModel
impl SpeechModel for GoogleSpeechModel
Source§fn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
Provider identifier.
Source§async fn do_generate(
&self,
options: SpeechOptions,
) -> Result<SpeechResult, ProviderError>
async fn do_generate( &self, options: SpeechOptions, ) -> Result<SpeechResult, ProviderError>
Synthesizes
options.text.Auto Trait Implementations§
impl !RefUnwindSafe for GoogleSpeechModel
impl !UnwindSafe for GoogleSpeechModel
impl Freeze for GoogleSpeechModel
impl Send for GoogleSpeechModel
impl Sync for GoogleSpeechModel
impl Unpin for GoogleSpeechModel
impl UnsafeUnpin for GoogleSpeechModel
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