pub struct SpeechSettings {
pub language: String,
pub voice: SpeechVoice,
pub speaker: Option<String>,
pub temperature: f32,
pub top_k: usize,
pub repetition_penalty: f32,
pub repetition_window: usize,
pub seed: u64,
}Expand description
How to speak. The default is what the model card recommends, in Portuguese.
Fields§
§language: StringOne of SPEECH_LANGUAGES. Kokoro speaks only Portuguese.
voice: SpeechVoiceThe voice, when no speaker is named.
speaker: Option<String>One of the model’s own voices, such as pm_santa among KOKORO_SPEAKERS. Without
one, Kokoro speaks as pf_dora for SpeechVoice::Female and pm_alex for
SpeechVoice::Male. LFM3 Audio has none and leaves it out.
temperature: f32How free each code is to vary; 0 always takes the likeliest.
top_k: usizeHow many codes it chooses among; 0 is all of them.
repetition_penalty: f32How much it avoids codes it has just used; 1 does not.
repetition_window: usizeHow many frames back it looks to avoid them.
seed: u64Where its choices start: the same text with the same seed sounds the same.
Implementations§
Trait Implementations§
Source§impl Clone for SpeechSettings
impl Clone for SpeechSettings
Source§fn clone(&self) -> SpeechSettings
fn clone(&self) -> SpeechSettings
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 SpeechSettings
impl Debug for SpeechSettings
Source§impl Default for SpeechSettings
impl Default for SpeechSettings
Source§impl PartialEq for SpeechSettings
impl PartialEq for SpeechSettings
impl StructuralPartialEq for SpeechSettings
Auto Trait Implementations§
impl Freeze for SpeechSettings
impl RefUnwindSafe for SpeechSettings
impl Send for SpeechSettings
impl Sync for SpeechSettings
impl Unpin for SpeechSettings
impl UnsafeUnpin for SpeechSettings
impl UnwindSafe for SpeechSettings
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more