pub struct RealtimeAudioApi {
pub config: RealtimeAudioConfig,
/* private fields */
}Expand description
Real-time Audio API client with WebRTC support
Fields§
§config: RealtimeAudioConfigConfiguration for real-time audio API
Implementations§
Source§impl RealtimeAudioApi
impl RealtimeAudioApi
Sourcepub fn new<S: Into<String>>(api_key: S) -> Result<Self>
pub fn new<S: Into<String>>(api_key: S) -> Result<Self>
Create a new Real-time Audio API client
Sourcepub fn new_with_config<S: Into<String>>(
api_key: S,
config: RealtimeAudioConfig,
) -> Result<Self>
pub fn new_with_config<S: Into<String>>( api_key: S, config: RealtimeAudioConfig, ) -> Result<Self>
Create a new client with custom configuration
Sourcepub fn new_with_base_url<S: Into<String>>(
api_key: S,
base_url: S,
) -> Result<Self>
pub fn new_with_base_url<S: Into<String>>( api_key: S, base_url: S, ) -> Result<Self>
Create a new client with custom base URL
Sourcepub async fn create_session(
&self,
request: &RealtimeSessionRequest,
) -> Result<Arc<RealtimeSession>>
pub async fn create_session( &self, request: &RealtimeSessionRequest, ) -> Result<Arc<RealtimeSession>>
Create a new real-time audio session
Sourcepub async fn get_session(
&self,
session_id: &str,
) -> Option<Arc<RealtimeSession>>
pub async fn get_session( &self, session_id: &str, ) -> Option<Arc<RealtimeSession>>
Get an existing session
Sourcepub async fn list_sessions(&self) -> Vec<String>
pub async fn list_sessions(&self) -> Vec<String>
List active sessions
Sourcepub async fn close_session(&self, session_id: &str) -> Result<()>
pub async fn close_session(&self, session_id: &str) -> Result<()>
Close a session
Source§impl RealtimeAudioApi
impl RealtimeAudioApi
Sourcepub async fn connect_webrtc(&self, session: &Arc<RealtimeSession>) -> Result<()>
pub async fn connect_webrtc(&self, session: &Arc<RealtimeSession>) -> Result<()>
Connect to WebRTC endpoint using ephemeral key
Auto Trait Implementations§
impl Freeze for RealtimeAudioApi
impl !RefUnwindSafe for RealtimeAudioApi
impl Send for RealtimeAudioApi
impl Sync for RealtimeAudioApi
impl Unpin for RealtimeAudioApi
impl !UnwindSafe for RealtimeAudioApi
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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