pub struct StreamEngine { /* private fields */ }Implementations§
Source§impl StreamEngine
impl StreamEngine
pub fn new() -> Self
pub fn register_vad( &mut self, vad_type: VadType, creator: FnCreateVadProcessor, ) -> &mut Self
pub fn register_eou( &mut self, name: String, creator: FnCreateEouProcessor, ) -> &mut Self
pub fn register_asr( &mut self, asr_type: TranscriptionType, creator: FnCreateAsrClient, ) -> &mut Self
pub fn register_tts( &mut self, tts_type: SynthesisType, creator: FnCreateTtsClient, ) -> &mut Self
pub fn create_vad_processor( &self, token: CancellationToken, event_sender: EventSender, option: VADOption, ) -> Result<Box<dyn Processor>>
pub fn create_eou_processor( &self, token: CancellationToken, event_sender: EventSender, option: EouOption, ) -> Result<Box<dyn Processor>>
pub async fn create_asr_processor( &self, track_id: TrackId, cancel_token: CancellationToken, option: TranscriptionOption, event_sender: EventSender, ) -> Result<Box<dyn Processor>>
pub async fn create_tts_client( &self, streaming: bool, tts_option: &SynthesisOption, ) -> Result<Box<dyn SynthesisClient>>
pub async fn create_processors( engine: Arc<StreamEngine>, track: &dyn Track, cancel_token: CancellationToken, event_sender: EventSender, packet_sender: TrackPacketSender, option: &CallOption, ) -> Result<Vec<Box<dyn Processor>>>
pub async fn create_tts_track( engine: Arc<StreamEngine>, cancel_token: CancellationToken, session_id: String, track_id: TrackId, ssrc: u32, play_id: Option<String>, streaming: bool, tts_option: &SynthesisOption, ) -> Result<(SynthesisHandle, Box<dyn Track>)>
pub fn with_processor_hook( &mut self, hook_fn: CreateProcessorsHook, ) -> &mut Self
pub fn default_create_procesors_hook( engine: Arc<StreamEngine>, track_id: TrackId, cancel_token: CancellationToken, event_sender: EventSender, packet_sender: TrackPacketSender, option: CallOption, ) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn Processor>>>> + Send>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamEngine
impl !RefUnwindSafe for StreamEngine
impl Send for StreamEngine
impl Sync for StreamEngine
impl Unpin for StreamEngine
impl UnsafeUnpin for StreamEngine
impl !UnwindSafe for StreamEngine
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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