
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@pipecat-ai/gemini-live-websocket-transport
Advanced tools
Pipecat Gemini Multimodal Live Transport Package
A real-time websocket transport implementation for interacting with Google's Gemini Multimodal Live API, supporting bidirectional audio and unidirectional text communication.
npm install \
@pipecat-ai/client-js \
@pipecat-ai/real-time-websocket-transport \
@pipecat-ai/gemini-live-websocket-transport
The GeminiLiveWebsocketTransport
class extends the DirectToLLMBaseWebSocketTransport
to implement a fully functional Pipecat Transport
. It provides a framework for implementing real-time communication directly with the Gemini Multimodal Live voice-to-voice service. It handles media device management, audio/video streams, and state management for the connection.
import { GeminiLiveWebsocketTransport, GeminiLLMServiceOptions } from '@pipecat-ai/gemini-live-websocket-transport';
const options: GeminiLLMServiceOptions = {
api_key: 'YOUR_API_KEY',
generation_config: {
temperature: 0.7,
maxOutput_tokens: 1000
}
};
let pcConfig: PipecatClientOptions = {
transport: new GeminiLiveWebsocketTransport(options),
...
};
interface GeminiLLMServiceOptions {
api_key: string; // Required: Your Gemini API key
initial_messages?: Array<{ // Optional: Initial conversation context
content: string;
role: string;
}>;
generation_config?: { // Optional: Generation parameters
candidate_count?: number;
maxOutput_tokens?: number;
temperature?: number;
top_p?: number;
top_k?: number;
presence_penalty?: number;
frequency_penalty?: number;
response_modalities?: string;
speech_config?: {
voice_config?: {
prebuilt_voice_config?: {
voice_name: "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede";
};
};
};
};
}
// at setup time...
pcClient.appendToContext({ role: "user", content: 'Hello Gemini!' });
The transport implements the various Pipecat event handlers. Check out the docs or samples for more info.
initialize()
: Set up the transport and establish connectionsendMessage(message)
: Send a text messagehandleUserAudioStream(data)
: Stream audio data to the modeldisconnectLLM()
: Close the connectionsendReadyMessage()
: Signal ready stateThe transport can be in one of the following states:
The transport includes comprehensive error handling for:
BSD-2 Clause
FAQs
Pipecat Gemini Multimodal Live Transport Package
The npm package @pipecat-ai/gemini-live-websocket-transport receives a total of 179 weekly downloads. As such, @pipecat-ai/gemini-live-websocket-transport popularity was classified as not popular.
We found that @pipecat-ai/gemini-live-websocket-transport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.