pub struct VoxtralTtsRunner { /* private fields */ }Implementations§
Source§impl VoxtralTtsRunner
impl VoxtralTtsRunner
pub fn builder() -> VoxtralTtsRunnerBuilder
pub fn open(model_dir: &Path) -> Result<VoxtralTtsRunner, Error>
pub fn open_with_options( model_dir: &Path, options: VoxtralTtsOptions, ) -> Result<VoxtralTtsRunner, Error>
pub fn config(&self) -> &VoxtralTtsConfig
pub fn device(&self) -> Device
pub fn options(&self) -> &VoxtralTtsOptions
pub fn model_dir(&self) -> &Path
pub fn decode_codes_to_pcm( &self, codes: &[u32], n_frames: usize, ) -> Result<Vec<f32>, Error>
pub fn decode_codes_file( &self, codes_path: &Path, out_wav: &Path, ) -> Result<(), Error>
pub fn voice_clone_support(&self) -> VoiceCloneSupport
Sourcepub fn synthesize_native_with_voice(
&mut self,
prompt_tokens: &[u32],
voice_emb: &VoiceEmbedding,
out_wav: &Path,
gen_cfg: &GenerationConfig,
) -> Result<(), Error>
pub fn synthesize_native_with_voice( &mut self, prompt_tokens: &[u32], voice_emb: &VoiceEmbedding, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
Native path with an explicit voice embedding (preset or cloned).
Sourcepub fn synthesize_cloned_from_wav(
&mut self,
prompt_tokens: &[u32],
reference_wav: &Path,
out_wav: &Path,
gen_cfg: &GenerationConfig,
) -> Result<(), Error>
pub fn synthesize_cloned_from_wav( &mut self, prompt_tokens: &[u32], reference_wav: &Path, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
Encode reference audio then synthesize (requires injected encoder weights).
Sourcepub fn synthesize_cloned_with_text(
&mut self,
text: &str,
reference_wav: &Path,
out_wav: &Path,
gen_cfg: &GenerationConfig,
) -> Result<(), Error>
pub fn synthesize_cloned_with_text( &mut self, text: &str, reference_wav: &Path, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
Encode reference audio, tokenize for its frame count, then synthesize.
Sourcepub fn synthesize_native(
&mut self,
prompt_tokens: &[u32],
voice: &str,
out_wav: &Path,
gen_cfg: &GenerationConfig,
) -> Result<(), Error>
pub fn synthesize_native( &mut self, prompt_tokens: &[u32], voice: &str, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
Native path: compiled LM + acoustic (or eager fallbacks) + codec decode on CPU.
pub fn synthesize_native_from_token_file( &mut self, prompt_tokens_path: &Path, voice: &str, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
pub fn synthesize_cloned_from_token_file( &mut self, prompt_tokens_path: &Path, reference_wav: &Path, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
pub fn synthesize_native_with_embedding_file( &mut self, prompt_tokens_path: &Path, voice_embedding: &Path, out_wav: &Path, gen_cfg: &GenerationConfig, ) -> Result<(), Error>
pub fn encode_reference_to_file( &self, reference_wav: &Path, out_f32: &Path, voice_name: &str, ) -> Result<VoiceEmbedding, Error>
Sourcepub fn bench_native_profiled(
&mut self,
prompt_tokens: &[u32],
voice: &str,
gen_cfg: &GenerationConfig,
options: &VoxtralTtsOptions,
) -> Result<VoxtralTtsBenchReport, Error>
pub fn bench_native_profiled( &mut self, prompt_tokens: &[u32], voice: &str, gen_cfg: &GenerationConfig, options: &VoxtralTtsOptions, ) -> Result<VoxtralTtsBenchReport, Error>
Timed native synthesis on a fixed prompt (same weights for all option sets).
pub fn synthesize_native_codes( &mut self, prompt_tokens: &[u32], voice: &str, gen_cfg: &GenerationConfig, ) -> Result<Vec<u32>, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for VoxtralTtsRunner
impl !Sync for VoxtralTtsRunner
impl !UnwindSafe for VoxtralTtsRunner
impl Freeze for VoxtralTtsRunner
impl Send for VoxtralTtsRunner
impl Unpin for VoxtralTtsRunner
impl UnsafeUnpin for VoxtralTtsRunner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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