mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df5ac8913d | |||
| 9696434145 | |||
| 9fc44bea63 |
@@ -110,9 +110,18 @@ electron.ipcMain.handle('get-module-names', async () => {
|
|||||||
"ai_modules":[],
|
"ai_modules":[],
|
||||||
"transcription_modules":[]
|
"transcription_modules":[]
|
||||||
}
|
}
|
||||||
});
|
mapFunctions.forEach(e => {
|
||||||
|
switch(e.type){
|
||||||
|
case "llm":
|
||||||
|
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})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
// console.log(module_array);
|
// console.log(module_array);
|
||||||
return module_array;
|
return module_array
|
||||||
});
|
});
|
||||||
|
|
||||||
// electron.ipcMain.on("get_modules", async (event, args) => {
|
// electron.ipcMain.on("get_modules", async (event, args) => {
|
||||||
@@ -186,6 +195,29 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
console.log("\n\n Running the Audio to Transcription module");
|
||||||
|
// TODO implement transcription module
|
||||||
|
// This code handles the Audio to Text transcription module call
|
||||||
|
await mapFunctions
|
||||||
|
.get("module-handler")
|
||||||
|
.function(args.transcription.module, audiopath)
|
||||||
|
.then((resp) => {
|
||||||
|
console.log(resp);
|
||||||
|
transcriptpath = resp;
|
||||||
|
curstep++;
|
||||||
|
mainWindow.webContents.send("progress", {
|
||||||
|
curstep: curstep,
|
||||||
|
totalsteps: totalsteps,
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
mainWindow.webContents.send("error", err);
|
||||||
|
console.log(err);
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log("\n\n Running the Transcription Summarizer module");
|
console.log("\n\n Running the Transcription Summarizer module");
|
||||||
// This code summarises the transcript, so that it can be used by an llm
|
// This code summarises the transcript, so that it can be used by an llm
|
||||||
// await mapFunctions.get("summarize-transcription").function('A:\\programing\\@projects\\video2document\\storage\\transcripts\\IMG_2978.json').then(resp => {
|
// await mapFunctions.get("summarize-transcription").function('A:\\programing\\@projects\\video2document\\storage\\transcripts\\IMG_2978.json').then(resp => {
|
||||||
|
|||||||
Reference in New Issue
Block a user