You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition/src/ios/CDVSpeechRecognitionViewController.swift
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -126,13 +126,13 @@ public class CDVSpeechRecognitionViewController: UIViewController, SFSpeechRecog
processNode.connect(audioContext.destination);//if the script node is not connected to an output the "onaudioprocess" event is not triggered in chrome.
73
+
}
74
+
stopFun=function(){
75
+
source.disconnect(processNode);
76
+
processNode.disconnect(audioContext.destination);
77
+
//processNode.disconnect();
78
+
}
79
+
//Error
80
+
}else{
81
+
console.error('Recorder - no valid audio processor found!');
82
+
return;
83
+
}
65
84
66
85
//Will be called at beginning of SepiaFW.audioRecorder.start();
67
-
this.start=function(){
68
-
this.node.connect(this.context.destination);// if the script node is not connected to an output the "onaudioprocess" event is not triggered in chrome.
86
+
this.start=function(){
87
+
recording=true;
88
+
startFun();
69
89
}
70
90
71
91
//Will be called at beginning of SepiaFW.audioRecorder.stop();
72
-
this.stop=function(){
92
+
this.stop=function(){
73
93
recording=false;
74
-
this.node.disconnect(0);
94
+
stopFun();
75
95
}
76
96
77
-
this.record=function(ws){
97
+
this.connect=function(ws){
78
98
websocket=ws;
79
-
recording=true;
80
99
//console.log('Recorder record - ws: ' + ws); //DEBUG
81
-
//console.log(this.node); //DEBUG
100
+
//console.log(processNode); //DEBUG
82
101
}
83
102
84
-
this.sendHeader=function(ws){
103
+
this.sendHeader=function(ws){
85
104
varsampleLength=1000000;
86
105
varmono=true;
87
-
varsampleRate=16000;//TODO: this might not be true! We cannot guarantee that!
0 commit comments