-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreload.js
More file actions
16 lines (15 loc) · 888 Bytes
/
Copy pathpreload.js
File metadata and controls
16 lines (15 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('museonic', {
quitApp: () => ipcRenderer.invoke('app:quit'),
onRecordTrigger: (callback) => ipcRenderer.on('trigger-record', callback),
recordStart: () => ipcRenderer.invoke('record:start'),
recordStop: () => ipcRenderer.invoke('record:stop'),
transcribeAudio: (file) => ipcRenderer.invoke('audio:transcribe', file),
searchSong: (text) => ipcRenderer.invoke('song:search', text),
playSong: (payload) => ipcRenderer.invoke('song:play', payload),
stopSong: () => ipcRenderer.invoke('song:stop'),
determineIntent: (transcript) => ipcRenderer.invoke('intent:determine', transcript),
processRecording: (file) => ipcRenderer.invoke('capture:process', file),
getDiagnostics: () => ipcRenderer.invoke('app:diagnostics'),
getBranding: () => ipcRenderer.invoke('app:branding')
});