-//const streamToText = require('./stream-to-text.js');
+const streamToText = require('./stream-to-text.js');
const path = require('path');
const wav = require('wav')
const EventEmitter = require('events');
this.buffer = undefined;
this.writer = undefined;
this.path = undefined;
-/*
+
this.transcripter = new streamToText.Transcripter();
this.transcripter.on('data', data => {
this.transcripter.on('error', err => {
console.error(err);
- });*/
+ });
}
receive(data) {
}
- //this.transcripter.putData(data);
+ this.transcripter.putData(data);
}
}
this.active = true;
this.hold = false;
this.buffer = undefined;
- //this.transcripter.start();
+ this.transcripter.start();
}
catch(err) {
this.active = false;
console.log(`Recorder ${this.index} ended`);
- //this.transcripter.stop();
+ this.transcripter.stop();
console.log(`Registering header on recorder ${this.index}`);
this.writer.end();
"description": "A desktop GUI for the ODAS library",
"main": "main.js",
"scripts": {
- "start": "electron ."
+ "start": "electron .",
+ "postinstall": "./node_modules/.bin/electron-rebuild"
},
"author": "Cedric Godin",
"license": "MIT",
const electron = require('electron');
const fork = require('child_process').fork;
+const spawn = require('child_process').spawn;
const path = require('path')
const url = require('url')
* Start the recording process
*/
-const recordingProcess = fork('./recordings.js');
+const recordingProcess = spawn(process.execPath, ['./recordings.js'], {stdio: [0, 1, 2, 'ipc']});
exports.quit = function quit() {
recordingProcess.kill();
}
const fs = require('fs');
const info = require('wav-file-info');
const dialog = require('electron').remote.dialog;
-//const speechToText = require('./../resources/js/speech-to-text.js');
+const speechToText = require('./../resources/js/speech-to-text.js');
// Fuzzy recording class
class FuzzyRecording {
if(err) console.log(err);
})
}
-/*
+
else {
this.createTranscript();
}
-*/
+
}
readInfo(retry) {
}
})
}
-/*
+
createTranscript() {
const txtPath = this.path.slice(0, -4)+'.txt';
}
});
}
-*/
+
play() {
this.isPlaying = true