
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
agora-realtime-ai-api
Advanced tools
Agora's low latency, high performance Realtime API to work with Voice Conversational AI
agora-realtime-ai-api
Python PackageRtcOptions
ClassThe RtcOptions
class represents the configuration options for an RTC (Real-Time Communication) session.
RtcOptions(
*,
channel_name: str = None,
uid: int = 0,
sample_rate: int = 24000,
channels: int = 1,
enable_pcm_dump: bool = False
)
False
).AudioStream
ClassThe AudioStream
class represents an iterable stream of PCM audio frames.
AudioStream()
__aiter__() -> AsyncIterator[PcmAudioFrame]
: Async iterator to traverse through audio frames.__anext__() -> PcmAudioFrame
: Returns the next audio frame in the queue.Channel
ClassThe Channel
class handles the RTC channel and associated operations such as connection, audio subscriptions, and data stream messages.
Channel(rtc: "RtcEngine", options: RtcOptions)
connect() -> None
: Connects to the channel asynchronously.disconnect() -> None
: Disconnects from the channel asynchronously.get_audio_frames(uid: int) -> AudioStream
: Returns the audio stream for a specific user.push_audio_frame(frame: bytes) -> None
: Sends a PCM audio frame to the channel.clear_sender_audio_buffer() -> None
: Clears the audio buffer used for sending.subscribe_audio(uid: int) -> None
: Subscribes to a user's audio stream.unsubscribe_audio(uid: int) -> None
: Unsubscribes from a user's audio stream.send_stream_message(data: str, msg_id: str) -> None
: Sends a data stream message to the channel.ChatMessage
ClassRepresents a chat message to be sent over the RTC channel.
ChatMessage(message: str, msg_id: str)
Chat
ClassHandles the queue of chat messages and sends them over the RTC channel.
Chat(channel: Channel)
send_message(item: ChatMessage) -> None
: Sends a chat message.RtcEngine
ClassThe RtcEngine
class initializes the Agora service and provides methods for managing RTC channels.
RtcEngine(appid: str, appcert: str)
create_channel(options: RtcOptions) -> Channel
: Creates an RTC channel with the given options.destroy() -> None
: Destroys the RTC engine instance.FAQs
Agora's low latency, high performance Realtime API to work with Voice Conversational AI
We found that agora-realtime-ai-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.