mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Fixed Transcription Summarizer, and now the whole pipeline works (except for LLM, because we need the keys for that)
This commit is contained in:
@@ -139,7 +139,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
let audiopath = ""
|
||||
let transcriptpath = ""
|
||||
|
||||
/* console.log("\n\n Running the Video to Audio Extractor");
|
||||
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 => {
|
||||
console.log(resp);
|
||||
@@ -164,13 +164,12 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
||||
mainWindow.webContents.send("error", err)
|
||||
return
|
||||
})
|
||||
*/
|
||||
|
||||
|
||||
console.log("\n\n Running the Transcription Summarizer module");
|
||||
// This code summarises the transcript, so that it can be used by an llm
|
||||
// await mapFunctions.get("summarize-transcription").function(transcriptpath).then(resp => {
|
||||
await mapFunctions.get("summarize-transcription").function('/Users/santa/Proj25/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 => {
|
||||
await mapFunctions.get("summarize-transcription").function(transcriptpath).then(resp => {
|
||||
console.log(resp);
|
||||
transcriptpath = resp
|
||||
curstep++
|
||||
|
||||
@@ -28,10 +28,13 @@ module.exports = {
|
||||
// JSON parsen
|
||||
if (typeof args === "string") {
|
||||
try {
|
||||
await fs.readFile(args, 'utf8', function (err, data) {
|
||||
await new Promise((res) => {
|
||||
fs.readFile(args, 'utf8', function (err, data) {
|
||||
if (err) throw err;
|
||||
inputJson = JSON.parse(data);
|
||||
res()
|
||||
});
|
||||
})
|
||||
} catch (e) {
|
||||
console.log("Invalid JSON in summarize-transcription");
|
||||
console.log(e)
|
||||
|
||||
Reference in New Issue
Block a user