
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@pipecat-ai/realtime-websocket-transport
Advanced tools
Pipecat Base Transport for RealTime WebSocket APIs Package
A flexible abstract transport class for implementing connections to directly communicate with LLMs that support voice-to-voice modalities.
npm install \
@pipecat-ai/client-js \
@pipecat-ai/real-time-websocket-transport
The RealTimeWebsocketTransport class provides a foundation for building transports for direct voice-to-voice communication:
This Transport type is primarily intended for dev-only and testing purposes. Since this transport talks directly with the LLM, there is no way to obscure API Keys necessary for doing so. Developers will need to eventually build a server component with a server-friendly transport (See the daily-transport as an example.)
To use this package, create a new Transport by extending the RealTimeWebsocketTransport class and implement the following abstract functions:
import { RealTimeWebsocketTransport } from '@pipecat-ai/real-time-websocket-transport';
export interface MyLLMOptions extends LLMServiceOptions {
api_key: string,
// define types for all the various options your
// LLM service may want to support during setup/connection
}
class MyLLMServiceTransport extends RealTimeWebsocketTransport {
constructor(service_options: GeminiLLMServiceOptions, manager?: MediaManager) {
super(service_options, manager);
// Initialize class variables
}
async initializeLLM(): void {
// Initialize your LLM service client
}
async attachLLMListeners(): void {
// Set up event listeners to handle message from your LLM service
}
async connectLLM(): Promise<void> {
// Implement connection logic for the LLM
}
async disconnectLLM(): Promise<void> {
// Disconnect from the LLM
}
handleUserAudioStream(data: ArrayBuffer): void {
// Pass the data provided to the LLM
}
async sendReadyMessage(): Promise<void> {
// call this._onMessage() with a BOT_READY message once the
// LLM is connected and ready to receive data
}
sendMessage(message: RTVIMessage): void {
// Implement sending other LLM-specific messages to the LLM
// This is how the user can call things like rtviClient.sendMessage(...)
// and communicate in other ways with the LLM
}
}
constructor(service_options: LLMServiceOptions, manager: MediaManager)
initializeLLM(): voidattachLLMListeners(): voidconnectLLM(): Promise<void>disconnectLLM(): Promise<void>handleUserAudioStream(data: ArrayBuffer): voidsendReadyMessage()sendMessage(message: RTVIMessage)getAllMics(): Promise<MediaDeviceInfo[]>getAllCams(): Promise<MediaDeviceInfo[]>getAllSpeakers(): Promise<MediaDeviceInfo[]>updateMic(micId: string): Promise<void>updateCam(camId: string): voidupdateSpeaker(speakerId: string): voidget state(): TransportStateget isCamEnabled(): booleanget isMicEnabled(): booleanThe transport supports emitting the events defined by the RTVI Specification
BSD-2 Clause
FAQs
Pipecat Base Transport for RealTime WebSocket APIs Package
The npm package @pipecat-ai/realtime-websocket-transport receives a total of 28 weekly downloads. As such, @pipecat-ai/realtime-websocket-transport popularity was classified as not popular.
We found that @pipecat-ai/realtime-websocket-transport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.