kenken999 commited on
Commit
2d211fd
·
1 Parent(s): a6e87e3
Files changed (1) hide show
  1. staticfiles/livetest.html +10 -1
staticfiles/livetest.html CHANGED
@@ -25,6 +25,14 @@
25
  <script>
26
  let _debug = 0;
27
  'use strict';
 
 
 
 
 
 
 
 
28
  class MiiboAvatar {
29
  constructor(config) {
30
  this.container = config.container;
@@ -319,7 +327,8 @@ async startTalk(input) {
319
  voice_id = gender == "male" ? "ja-JP-KeitaNeural" : "ja-JP-NanamiNeural"
320
  }
321
  }
322
-
 
323
  const requestOptions = {
324
  method: 'POST',
325
  headers: {
 
25
  <script>
26
  let _debug = 0;
27
  'use strict';
28
+
29
+ function speak(input) {
30
+ var text = inpput;//document.getElementById("text").value;
31
+ var speech = new SpeechSynthesisUtterance(text);
32
+ speech.lang = "ja-JP"; // 日本語に設定
33
+ window.speechSynthesis.speak(speech);
34
+ }
35
+
36
  class MiiboAvatar {
37
  constructor(config) {
38
  this.container = config.container;
 
327
  voice_id = gender == "male" ? "ja-JP-KeitaNeural" : "ja-JP-NanamiNeural"
328
  }
329
  }
330
+ alert("start tolak 330")
331
+ speak(input)
332
  const requestOptions = {
333
  method: 'POST',
334
  headers: {