|
@@ -17,9 +17,9 @@ var MAXIMUM_SENTENCE_LENGTH = 80;
|
17
|
17
|
* will be merged to create a transcript
|
18
|
18
|
* @param {AudioRecorder} audioRecorder An audioRecorder recording a conference
|
19
|
19
|
*/
|
20
|
|
-var transcriber = function(audioRecorder) {
|
|
20
|
+var transcriber = function() {
|
21
|
21
|
//the object which can record all audio in the conference
|
22
|
|
- this.audioRecorder = audioRecorder;
|
|
22
|
+ this.audioRecorder = new AudioRecorder();
|
23
|
23
|
//this object can send the recorder audio to a speech-to-text service
|
24
|
24
|
this.transcriptionService = new SphinxService();
|
25
|
25
|
//holds a counter to keep track if merging can start
|
|
@@ -273,10 +273,21 @@ var pushWordToSortedArray = function(array, word){
|
273
|
273
|
};
|
274
|
274
|
|
275
|
275
|
/**
|
276
|
|
- * Returns the AudioRecorder module to add and remove tracks to
|
|
276
|
+ * Gives the transcriber a JitsiTrack holding an audioStream to transcribe.
|
|
277
|
+ * The JitsiTrack is given to the audioRecorder. If it doesn't hold an
|
|
278
|
+ * audiostream, it will not be added by the audioRecorder
|
|
279
|
+ * @param {JitsiTrack} track the track to give to the audioRecorder
|
277
|
280
|
*/
|
278
|
|
-transcriber.getAudioRecorder = function getAudioRecorder() {
|
279
|
|
- return this.audioRecorder;
|
|
281
|
+transcriber.prototype.addTrack = function(track){
|
|
282
|
+ this.audioRecorder.addTrack(track);
|
|
283
|
+};
|
|
284
|
+
|
|
285
|
+/**
|
|
286
|
+ * Remove the given track from the auioRecorder
|
|
287
|
+ * @param track
|
|
288
|
+ */
|
|
289
|
+transcriber.prototype.removeTrack = function(track){
|
|
290
|
+ this.audioRecorder.removeTrack(track);
|
280
|
291
|
};
|
281
|
292
|
|
282
|
293
|
/**
|