mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
some more cleanup
This commit is contained in:
@@ -132,7 +132,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
globalArgs = args
|
||||
let curstep = 0
|
||||
let totalsteps = 4
|
||||
|
||||
|
||||
const TEMPLATE_MAP = {
|
||||
"followup-report": "followup_report.txt",
|
||||
"agenda": "agenda.txt",
|
||||
@@ -140,9 +140,9 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
"sprint-planning": "sprint_planning_note.txt",
|
||||
"custom": "custom_document.txt"
|
||||
};
|
||||
|
||||
|
||||
const templateFile = TEMPLATE_MAP[args.document.type];
|
||||
|
||||
|
||||
if (!templateFile) {
|
||||
throw new Error("Unknown document type: " + args.document.type);
|
||||
}
|
||||
@@ -196,17 +196,17 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
// This code handles the Text to Document processing module call
|
||||
|
||||
console.log(`\n\n Running the LLM for Document Style ${args.document.type}`);
|
||||
|
||||
|
||||
await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
|
||||
console.log(resp);
|
||||
globalFinalHtmlPath = resp
|
||||
curstep++
|
||||
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps})
|
||||
}).catch(err => {
|
||||
mainWindow.webContents.send("error", err)
|
||||
return
|
||||
})
|
||||
|
||||
console.log(resp);
|
||||
globalFinalHtmlPath = resp
|
||||
curstep++
|
||||
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps})
|
||||
}).catch(err => {
|
||||
mainWindow.webContents.send("error", err)
|
||||
return
|
||||
})
|
||||
|
||||
|
||||
await mapFunctions.get("extract-speaker-snippets").function({audioPath: audiopath, jsonPath: transcriptpath }).then(resp => {
|
||||
mainWindow.webContents.send("submitSpeaker", resp)
|
||||
@@ -215,27 +215,6 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
mainWindow.webContents.send("error", err)
|
||||
return
|
||||
})
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user