pub struct TalkModeController { /* private fields */ }Expand description
Controller for Talk Mode – continuous voice conversation.
Wraps a VoiceChannel and manages the listen -> transcribe ->
agent -> speak loop. The controller runs until the cancellation
token is triggered (e.g., by Ctrl+C in the CLI).
Implementations§
Source§impl TalkModeController
impl TalkModeController
Sourcepub fn new(channel: Arc<VoiceChannel>, cancel: CancellationToken) -> Self
pub fn new(channel: Arc<VoiceChannel>, cancel: CancellationToken) -> Self
Create a new Talk Mode controller.
§Arguments
channel- The voice channel to control.cancel- Cancellation token to stop the session.
Sourcepub async fn run(
&self,
host: Arc<dyn ChannelAdapterHost>,
) -> Result<(), PluginError>
pub async fn run( &self, host: Arc<dyn ChannelAdapterHost>, ) -> Result<(), PluginError>
Run the Talk Mode loop until cancelled.
Starts the voice channel and blocks until the cancellation token is triggered. In the real implementation, the voice channel would continuously capture audio, detect speech, transcribe it, and deliver it to the agent pipeline.
Sourcepub async fn status(&self) -> VoiceStatus
pub async fn status(&self) -> VoiceStatus
Get the current voice status.
Sourcepub fn channel(&self) -> &Arc<VoiceChannel>
pub fn channel(&self) -> &Arc<VoiceChannel>
Get a reference to the underlying voice channel.
Auto Trait Implementations§
impl Freeze for TalkModeController
impl !RefUnwindSafe for TalkModeController
impl Send for TalkModeController
impl Sync for TalkModeController
impl Unpin for TalkModeController
impl UnsafeUnpin for TalkModeController
impl !UnwindSafe for TalkModeController
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