feat(voice): harden Gemini Live provider integration

This commit is contained in:
manjunath committed 2026-10-16 17:09:03 +05:30
1 parent d4492d8f8c
commit 4fde920665
102 files changed
+28528 -1581

No files matched your search

+22 -5
View File
@@ -1,10 +1,27 @@
import { createVoiceCommands as bindVoiceCommands } from './sessionCommands.js';
import { createRealtimeSession } from './realtimeSession.js';
import { createGeminiSession } from './geminiSession.js';
import { createProviderCommands } from './providerCommands.js';
import { supportedVoiceProviders } from './providerCapabilities.js';
/** Default composition; callers may supply another session adapter factory. */
/** Standalone provider selection; embedders may still supply their own adapter. */
export function createVoiceCommands(options) {
return bindVoiceCommands({
createSession: createRealtimeSession,
...options,
});
if (options.createSession) return bindVoiceCommands(options);
const factories = {
openai: createRealtimeSession,
gemini: createGeminiSession,
};
const supportedProviders = supportedVoiceProviders(
options.supportedProviders,
factories,
);
return createProviderCommands(
{ ...options, supportedProviders },
{
bind: bindVoiceCommands,
factories: Object.fromEntries(
supportedProviders.map((name) => [name, factories[name]]),
),
},
);
}