#[non_exhaustive]pub struct StreamingAudioConfig {
pub audio_encoding: AudioEncoding,
pub sample_rate_hertz: i32,
pub speaking_rate: f64,
/* private fields */
}Expand description
Description of the desired output audio data.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.audio_encoding: AudioEncodingRequired. The format of the audio byte stream. Streaming supports PCM, ALAW, MULAW and OGG_OPUS. All other encodings return an error.
sample_rate_hertz: i32Optional. The synthesis sample rate (in hertz) for this audio.
speaking_rate: f64Optional. Input only. Speaking rate/speed, in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 2.0 will return an error.
Implementations§
Source§impl StreamingAudioConfig
impl StreamingAudioConfig
Sourcepub fn set_audio_encoding<T: Into<AudioEncoding>>(self, v: T) -> Self
pub fn set_audio_encoding<T: Into<AudioEncoding>>(self, v: T) -> Self
Sets the value of audio_encoding.
§Example
ⓘ
use google_cloud_texttospeech_v1::model::AudioEncoding;
let x0 = StreamingAudioConfig::new().set_audio_encoding(AudioEncoding::Linear16);
let x1 = StreamingAudioConfig::new().set_audio_encoding(AudioEncoding::Mp3);
let x2 = StreamingAudioConfig::new().set_audio_encoding(AudioEncoding::OggOpus);Sourcepub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
pub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
Sets the value of sample_rate_hertz.
§Example
ⓘ
let x = StreamingAudioConfig::new().set_sample_rate_hertz(42);Sourcepub fn set_speaking_rate<T: Into<f64>>(self, v: T) -> Self
pub fn set_speaking_rate<T: Into<f64>>(self, v: T) -> Self
Sets the value of speaking_rate.
§Example
ⓘ
let x = StreamingAudioConfig::new().set_speaking_rate(42.0);Trait Implementations§
Source§impl Clone for StreamingAudioConfig
impl Clone for StreamingAudioConfig
Source§fn clone(&self) -> StreamingAudioConfig
fn clone(&self) -> StreamingAudioConfig
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 StreamingAudioConfig
impl Debug for StreamingAudioConfig
Source§impl Default for StreamingAudioConfig
impl Default for StreamingAudioConfig
Source§fn default() -> StreamingAudioConfig
fn default() -> StreamingAudioConfig
Returns the “default value” for a type. Read more
Source§impl Message for StreamingAudioConfig
impl Message for StreamingAudioConfig
Source§impl PartialEq for StreamingAudioConfig
impl PartialEq for StreamingAudioConfig
Source§fn eq(&self, other: &StreamingAudioConfig) -> bool
fn eq(&self, other: &StreamingAudioConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamingAudioConfig
Auto Trait Implementations§
impl Freeze for StreamingAudioConfig
impl RefUnwindSafe for StreamingAudioConfig
impl Send for StreamingAudioConfig
impl Sync for StreamingAudioConfig
impl Unpin for StreamingAudioConfig
impl UnsafeUnpin for StreamingAudioConfig
impl UnwindSafe for StreamingAudioConfig
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