pub struct OpenAiTtsProvider { /* private fields */ }Expand description
OpenAI TTS API implementation.
Posts to https://api.openai.com/v1/audio/speech with model “tts-1”.
Available voices: alloy, echo, fable, onyx, nova, shimmer.
Implementations§
Trait Implementations§
Source§impl CloudTtsProvider for OpenAiTtsProvider
impl CloudTtsProvider for OpenAiTtsProvider
Source§fn available_voices(&self) -> Vec<VoiceInfo>
fn available_voices(&self) -> Vec<VoiceInfo>
List available voices for this provider.
Source§fn synthesize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
voice_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CloudTtsResult, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn synthesize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
voice_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<CloudTtsResult, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Synthesize text to audio bytes. Read more
Auto Trait Implementations§
impl Freeze for OpenAiTtsProvider
impl !RefUnwindSafe for OpenAiTtsProvider
impl Send for OpenAiTtsProvider
impl Sync for OpenAiTtsProvider
impl Unpin for OpenAiTtsProvider
impl UnsafeUnpin for OpenAiTtsProvider
impl !UnwindSafe for OpenAiTtsProvider
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