pub struct OutputStream {
pub audio_pitch: Option<i32>,
pub audio_tempo: Option<f64>,
pub audio_format: Option<AudioFormat>,
}Expand description
Audio output settings for streaming TTS requests.
Identical to Output but without volume or target_lufs, which are
not supported by the streaming endpoint.
Fields§
§audio_pitch: Option<i32>Pitch adjustment in semitones (-12 to +12, default: 0)
audio_tempo: Option<f64>Speech speed multiplier (0.5 to 2.0, default: 1.0)
audio_format: Option<AudioFormat>Output audio format (wav or mp3, default: wav)
Implementations§
Source§impl OutputStream
impl OutputStream
Sourcepub fn audio_pitch(self, pitch: i32) -> Self
pub fn audio_pitch(self, pitch: i32) -> Self
Set the audio pitch (-12 to +12 semitones)
Sourcepub fn audio_tempo(self, tempo: f64) -> Self
pub fn audio_tempo(self, tempo: f64) -> Self
Set the audio tempo (0.5 to 2.0)
Sourcepub fn audio_format(self, format: AudioFormat) -> Self
pub fn audio_format(self, format: AudioFormat) -> Self
Set the audio format
Trait Implementations§
Source§impl Clone for OutputStream
impl Clone for OutputStream
Source§fn clone(&self) -> OutputStream
fn clone(&self) -> OutputStream
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 Debug for OutputStream
impl Debug for OutputStream
Source§impl Default for OutputStream
impl Default for OutputStream
Source§fn default() -> OutputStream
fn default() -> OutputStream
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OutputStream
impl<'de> Deserialize<'de> for OutputStream
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OutputStream
impl RefUnwindSafe for OutputStream
impl Send for OutputStream
impl Sync for OutputStream
impl Unpin for OutputStream
impl UnsafeUnpin for OutputStream
impl UnwindSafe for OutputStream
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