pub struct TtsService { /* private fields */ }Expand description
Concurrent TTS service. Implements TtsEngine (the modality trait)
and InferenceEngine (lifecycle).
Implementations§
Source§impl TtsService
impl TtsService
Sourcepub fn new(executor: TtsModelExecutor, model_id: ModelId) -> Self
pub fn new(executor: TtsModelExecutor, model_id: ModelId) -> Self
Create with a single executor (backward compatible).
Sourcepub fn new_multi(executors: Vec<TtsModelExecutor>, model_id: ModelId) -> Self
pub fn new_multi(executors: Vec<TtsModelExecutor>, model_id: ModelId) -> Self
Create with multiple executor slots for concurrent serving.
Trait Implementations§
Source§impl InferenceEngine for TtsService
impl InferenceEngine for TtsService
Source§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EngineStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EngineStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current engine status.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown engine gracefully.
Source§fn config(&self) -> &EngineConfig
fn config(&self) -> &EngineConfig
Get engine configuration.
Source§fn metrics(&self) -> EngineMetrics
fn metrics(&self) -> EngineMetrics
Get engine metrics.
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check.
Source§fn cache_metrics_snapshot(&self) -> Option<Value>
fn cache_metrics_snapshot(&self) -> Option<Value>
Optional cache metrics emitted by concrete LLM engines. Read more
Source§fn execution_attribution_snapshot(&self) -> Option<Value>
fn execution_attribution_snapshot(&self) -> Option<Value>
Optional compact provider-attribution witness from the active model
executor. The default keeps non-vNext engines source-compatible.
Source§fn admission_snapshot(
&self,
) -> Result<Option<ExecutorAdmissionSnapshot>, FerrumError>
fn admission_snapshot( &self, ) -> Result<Option<ExecutorAdmissionSnapshot>, FerrumError>
Runtime-authoritative admission state. Startup sizing estimates are
intentionally not accepted through this method.
Source§fn lora_metrics_snapshot(&self) -> Option<Value>
fn lora_metrics_snapshot(&self) -> Option<Value>
Optional LoRA runtime metrics emitted by concrete LLM engines.
Source§impl TtsEngine for TtsService
impl TtsEngine for TtsService
Source§fn synthesize_speech<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
language: Option<&'life2 str>,
chunk_frames: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn synthesize_speech<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
language: Option<&'life2 str>,
chunk_frames: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Synthesize speech → PCM audio chunks (streaming).
Returns Vec of PCM f32 samples per chunk.
Source§fn tts_sample_rate(&self) -> u32
fn tts_sample_rate(&self) -> u32
Get TTS sample rate.
Auto Trait Implementations§
impl !Freeze for TtsService
impl !RefUnwindSafe for TtsService
impl !UnwindSafe for TtsService
impl Send for TtsService
impl Sync for TtsService
impl Unpin for TtsService
impl UnsafeUnpin for TtsService
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<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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