From f858f2edbb6ffdfff158dcc64fc887a40ba57d63 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 5 Dec 2025 15:58:17 +0100 Subject: [PATCH 1/4] added functionality for transcription tool to tell the frontend what audio format to use --- main.js | 4 ++-- package-lock.json | 2 -- services/modules/transcription-remote/assembly.js | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 39c408d..6d1fe0e 100644 --- a/main.js +++ b/main.js @@ -95,11 +95,11 @@ electron.ipcMain.handle('get-module-names', async () => { module_array.ai_modules.push({"name": e.name, "displayname": e.displayname}) break; case "transcription": - module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname}) + module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname, "audioformat":e.audioformat}) break; } }) - // console.log(module_array); + console.log(module_array); return module_array }); diff --git a/package-lock.json b/package-lock.json index 4de511e..76227c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -299,7 +299,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.2.tgz", "integrity": "sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -2535,7 +2534,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/services/modules/transcription-remote/assembly.js b/services/modules/transcription-remote/assembly.js index 3b02e4c..5819a3c 100644 --- a/services/modules/transcription-remote/assembly.js +++ b/services/modules/transcription-remote/assembly.js @@ -89,6 +89,7 @@ module.exports = { name: 'assembly', type: 'transcription', displayname: 'AssemblyAI', + audioformat: "mp3", async function(audioFileName) { return new Promise(async (resolve, reject) => { From 8adf470f1899e3ae3746efce54b6dff5c586e0e8 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 5 Dec 2025 15:58:45 +0100 Subject: [PATCH 2/4] removed a debug console output --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 6d1fe0e..c9d14a8 100644 --- a/main.js +++ b/main.js @@ -99,7 +99,7 @@ electron.ipcMain.handle('get-module-names', async () => { break; } }) - console.log(module_array); + // console.log(module_array); return module_array }); From ed949289531f2891b5f1778ae3bbffb41ee2009c Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 5 Dec 2025 16:45:39 +0100 Subject: [PATCH 3/4] removed the need to send the transcription module defined audio output format to the frontend, and handle it on the backend instead --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c9d14a8..8e0625d 100644 --- a/main.js +++ b/main.js @@ -95,7 +95,7 @@ electron.ipcMain.handle('get-module-names', async () => { module_array.ai_modules.push({"name": e.name, "displayname": e.displayname}) break; case "transcription": - module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname, "audioformat":e.audioformat}) + module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname}) break; } }) @@ -141,7 +141,7 @@ electron.ipcMain.on("file_submit", async (event, args) => { console.log("\n\n Running the Video to Audio Extractor"); // This code handles the Video to Audio extraction module call - await mapFunctions.get("module-handler").function(args.video.module, {inputVideoPath: args.video.inputVideoPath, outputType: args.video.outputType}).then(resp => { + await mapFunctions.get("module-handler").function(args.video.module, {inputVideoPath: args.video.inputVideoPath, outputType: mapFunctions.get(args.transcription.module).audioformat}).then(resp => { console.log(resp); audiopath = resp curstep++ From e661aefbe8fb48eb774866be00bf29cd27c90748 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 5 Dec 2025 17:09:45 +0100 Subject: [PATCH 4/4] added json to send to frontend for the speaker naming functionality --- main.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/main.js b/main.js index 8e0625d..0510187 100644 --- a/main.js +++ b/main.js @@ -194,6 +194,24 @@ electron.ipcMain.on("file_submit", async (event, args) => { }) } + // TODO actually implement this functionality + // Module to get the first few lines for each speaker to send to the frontend +// await mapFunctions.get("speaker-getter-idfk").function(transcriptpath).then(resp => { +// console.log(resp); +// transcriptpath = resp +// curstep++ +// mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps}) + +// // { +// // speakerA: {source: "Pfad zur Audio File"}, +// // speakerB:..... +// // } + mainWindow.webContents.send("speakers", {speakerA:"pfad1", speakerB:"pfad2"}) +// }).catch(err => { +// mainWindow.webContents.send("error", err) +// return +// }) + } catch (error) { console.log(error);