Implement Push-to-Talk feature and enhance audio input settings in AssistantView and CustomizeView. Update README for API key instructions and improve audio processing logic in OpenAI SDK. Adjust pnpm-lock.yaml for dependency updates.
This commit is contained in:
@@ -186,6 +186,7 @@ async function initializeAISession(customPrompt = '', profile = 'interview', lan
|
||||
try {
|
||||
await openaiSdkProvider.initializeOpenAISDK(providerConfig);
|
||||
openaiSdkProvider.setSystemPrompt(systemPrompt);
|
||||
openaiSdkProvider.updatePushToTalkSettings(prefs.audioInputMode || 'auto');
|
||||
sendToRenderer('update-status', 'Ready (OpenAI SDK)');
|
||||
return true;
|
||||
} catch (error) {
|
||||
@@ -325,6 +326,16 @@ function setupAIProviderIpcHandlers(geminiSessionRef) {
|
||||
saveConversationTurn(transcription, response);
|
||||
});
|
||||
|
||||
ipcMain.on('push-to-talk-toggle', () => {
|
||||
if (currentProvider === 'openai-sdk') {
|
||||
openaiSdkProvider.togglePushToTalk();
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('update-push-to-talk-settings', (event, { inputMode } = {}) => {
|
||||
openaiSdkProvider.updatePushToTalkSettings(inputMode || 'auto');
|
||||
});
|
||||
|
||||
ipcMain.handle('initialize-ai-session', async (event, customPrompt, profile, language) => {
|
||||
return await initializeAISession(customPrompt, profile, language);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user