pub struct StreamProcessor { /* private fields */ }Expand description
Stream processor for real-time voice conversion in streaming
Implementations§
Source§impl StreamProcessor
impl StreamProcessor
Sourcepub fn new(platform: StreamingPlatform, config: StreamConfig) -> Result<Self>
pub fn new(platform: StreamingPlatform, config: StreamConfig) -> Result<Self>
Create new stream processor
Sourcepub async fn process_stream_audio(
&mut self,
input_audio: &[f32],
voice_preset: &str,
) -> Result<Vec<f32>>
pub async fn process_stream_audio( &mut self, input_audio: &[f32], voice_preset: &str, ) -> Result<Vec<f32>>
Process stream audio in real-time
Sourcepub async fn process_stream_with_mode(
&mut self,
input_audio: &[f32],
voice_preset: &str,
mode: StreamVoiceMode,
) -> Result<Vec<f32>>
pub async fn process_stream_with_mode( &mut self, input_audio: &[f32], voice_preset: &str, mode: StreamVoiceMode, ) -> Result<Vec<f32>>
Process stream audio with specific mode
Sourcepub async fn register_voice_preset(
&self,
preset_name: String,
characteristics: VoiceCharacteristics,
)
pub async fn register_voice_preset( &self, preset_name: String, characteristics: VoiceCharacteristics, )
Register voice preset for quick switching
Sourcepub async fn start_stream_session(
&self,
session_id: String,
stream_title: String,
) -> Result<()>
pub async fn start_stream_session( &self, session_id: String, stream_title: String, ) -> Result<()>
Start streaming session
Sourcepub async fn stop_stream_session(
&self,
session_id: &str,
) -> Result<StreamSession>
pub async fn stop_stream_session( &self, session_id: &str, ) -> Result<StreamSession>
Stop streaming session
Sourcepub fn get_stream_metrics(&self) -> StreamPerformanceMetrics
pub fn get_stream_metrics(&self) -> StreamPerformanceMetrics
Get current stream performance metrics
Sourcepub fn is_stream_performance_acceptable(&self) -> bool
pub fn is_stream_performance_acceptable(&self) -> bool
Check if streaming performance is acceptable
Sourcepub fn get_platform_integration(&self) -> PlatformIntegration
pub fn get_platform_integration(&self) -> PlatformIntegration
Get platform integration information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamProcessor
impl !RefUnwindSafe for StreamProcessor
impl Send for StreamProcessor
impl Sync for StreamProcessor
impl Unpin for StreamProcessor
impl UnsafeUnpin for StreamProcessor
impl !UnwindSafe for StreamProcessor
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
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