Spaces:
Running
on
Zero
Running
on
Zero
fa
Browse files- staticfiles/index.html +28 -2
- text.txt +1 -3
staticfiles/index.html
CHANGED
@@ -35,6 +35,7 @@ constructor(config) {
|
|
35 |
}
|
36 |
|
37 |
initialize() {
|
|
|
38 |
const RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
|
39 |
|
40 |
this.videoElement = document.getElementById(this.container);
|
@@ -50,6 +51,7 @@ initialize() {
|
|
50 |
}
|
51 |
|
52 |
async createNewStream() {
|
|
|
53 |
try {
|
54 |
this.stopAllStreams();
|
55 |
this.closePC();
|
@@ -155,7 +157,30 @@ audioRecognize() {
|
|
155 |
reader.readAsArrayBuffer(blob)
|
156 |
})
|
157 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
// Chrome Only
|
160 |
autoRecognize() {
|
161 |
this.rec.continuous = false
|
@@ -167,6 +192,7 @@ autoRecognize() {
|
|
167 |
this.playLoadingVideo();
|
168 |
|
169 |
this.rec.stop()
|
|
|
170 |
|
171 |
for (var i = e.resultIndex; i < e.results.length; i++) {
|
172 |
if (!e.results[i].isFinal) continue
|
@@ -200,8 +226,8 @@ arrayBufferToBase64(buffer) {
|
|
200 |
|
201 |
ask(message) {
|
202 |
//youtubeからの質問
|
203 |
-
alert("
|
204 |
-
ask(start);
|
205 |
this.getMiiboResponse(message);
|
206 |
}
|
207 |
|
|
|
35 |
}
|
36 |
|
37 |
initialize() {
|
38 |
+
alert("38");
|
39 |
const RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
|
40 |
|
41 |
this.videoElement = document.getElementById(this.container);
|
|
|
51 |
}
|
52 |
|
53 |
async createNewStream() {
|
54 |
+
alert("53")
|
55 |
try {
|
56 |
this.stopAllStreams();
|
57 |
this.closePC();
|
|
|
157 |
reader.readAsArrayBuffer(blob)
|
158 |
})
|
159 |
}
|
160 |
+
// Chrome Only
|
161 |
+
autoRecognize(message) {
|
162 |
+
this.rec.continuous = false
|
163 |
+
this.rec.interimResults = false
|
164 |
+
this.rec.lang = 'ja-JP'
|
165 |
+
|
166 |
+
this.rec.onresult = (e) => {
|
167 |
+
this.processing = true
|
168 |
+
this.playLoadingVideo();
|
169 |
|
170 |
+
this.rec.stop()
|
171 |
+
alert("start")
|
172 |
+
this.ask(transcript);
|
173 |
+
//for (var i = e.resultIndex; i < e.results.length; i++) {
|
174 |
+
// if (!e.results[i].isFinal) continue
|
175 |
+
//
|
176 |
+
// const { transcript } = e.results[i][0]
|
177 |
+
// this.ask(transcript);
|
178 |
+
//}
|
179 |
+
}
|
180 |
+
|
181 |
+
this.rec.onend = () => { this.autoRecognizeRestart() }
|
182 |
+
this.rec.start()
|
183 |
+
}
|
184 |
// Chrome Only
|
185 |
autoRecognize() {
|
186 |
this.rec.continuous = false
|
|
|
192 |
this.playLoadingVideo();
|
193 |
|
194 |
this.rec.stop()
|
195 |
+
alert("start")
|
196 |
|
197 |
for (var i = e.resultIndex; i < e.results.length; i++) {
|
198 |
if (!e.results[i].isFinal) continue
|
|
|
226 |
|
227 |
ask(message) {
|
228 |
//youtubeからの質問
|
229 |
+
alert("203 ask"+message);
|
230 |
+
//ask(start);
|
231 |
this.getMiiboResponse(message);
|
232 |
}
|
233 |
|
text.txt
CHANGED
@@ -1,3 +1 @@
|
|
1 |
-
|
2 |
-
出れず申し訳ありません。
|
3 |
-
こちらこそ何卒宜しくお願い致します。
|
|
|
1 |
+
【リッチメニュー】本日の金価格
|
|
|
|