mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
feat(voice): harden Gemini Live provider integration
This commit is contained in:
1 parent
d4492d8f8c
commit
4fde920665
102 files changed
+28528
-1581
No files matched your search
+22
-5
@@ -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]]),
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user