diff --git a/Audio-Transcription-Chrome/background.js b/Audio-Transcription-Chrome/background.js index 09de7dc..e21b04f 100644 --- a/Audio-Transcription-Chrome/background.js +++ b/Audio-Transcription-Chrome/background.js @@ -150,7 +150,14 @@ async function startCapture(options) { await sendMessageToTab(optionTab.id, { type: "start_capture", - data: { currentTabId: currentTab.id, host: options.host, port: options.port }, + data: { + currentTabId: currentTab.id, + host: options.host, + port: options.port, + multilingual: options.useMultilingual, + language: options.language, + task: options.task + }, }); } else { console.log("No Audio"); diff --git a/Audio-Transcription-Chrome/options.js b/Audio-Transcription-Chrome/options.js index ad7dfb1..ac2862c 100644 --- a/Audio-Transcription-Chrome/options.js +++ b/Audio-Transcription-Chrome/options.js @@ -79,11 +79,16 @@ async function startRecord(option) { stream.oninactive = () => { window.close(); }; - const socket = new WebSocket(`ws://${option.host}:${option.port}/`); let isServerReady = false; socket.onopen = function(e) { - socket.send("handshake"); + socket.send( + JSON.stringify({ + multilingual: option.multilingual, + language: option.language, + task: option.task + }) + ); }; socket.onmessage = async (event) => { diff --git a/Audio-Transcription-Chrome/popup.html b/Audio-Transcription-Chrome/popup.html index 5777929..4f2b6ec 100644 --- a/Audio-Transcription-Chrome/popup.html +++ b/Audio-Transcription-Chrome/popup.html @@ -15,5 +15,121 @@ +