add satement
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
parent
e2b2228d00
commit
fefc554f2b
25
simple.html
25
simple.html
@ -145,7 +145,7 @@
|
||||
|
||||
.statement {
|
||||
position: absolute;
|
||||
bottom: 160px;
|
||||
bottom: 450px;
|
||||
left: 80%;
|
||||
transform: translate(-50%);
|
||||
color: #fff;
|
||||
@ -164,9 +164,9 @@
|
||||
|
||||
.subtitle {
|
||||
position: absolute;
|
||||
bottom: 40%;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
top: 420px;
|
||||
left: 40%;
|
||||
transform: translateX(-50%);
|
||||
color: #000;
|
||||
padding: 12px;
|
||||
box-sizing: border-box;
|
||||
@ -336,18 +336,22 @@
|
||||
// })
|
||||
duix.on('speakSection', (data) => {
|
||||
console.info('speakSection', data)
|
||||
document.querySelector('.subtitle').innerText = data.content
|
||||
document.querySelector('.subtitle').innerText = document.querySelector('.subtitle').innerText + data.content
|
||||
// document.querySelector('.statement').innerText = all_answer + data;
|
||||
})
|
||||
duix.on('asrStop', (data) => {
|
||||
console.info('asrStop', data)
|
||||
document.querySelector('.statement').innerText = data.content;
|
||||
// document.querySelector('.subtitle').innerText = ''
|
||||
// document.querySelector('.statement').innerText = ''
|
||||
});
|
||||
duix.on('speakError', (data) => {
|
||||
console.info('speakError', data)
|
||||
})
|
||||
duix.on('asrResult', async (data) => {
|
||||
document.querySelector('.statement').innerText = ''
|
||||
document.querySelector('.subtitle').innerText = ''
|
||||
// document.querySelector('.statement').innerText = ''
|
||||
// document.querySelector('.subtitle').innerText = ''
|
||||
document.querySelector('.statement').innerText = data;
|
||||
|
||||
|
||||
console.info('asrResult', data, trigger_status);
|
||||
if (data == "小公" || data == "小共" || data == "小工"){
|
||||
@ -359,8 +363,9 @@
|
||||
|
||||
if (trigger_status) {
|
||||
try {
|
||||
document.querySelector('.subtitle').innerText = ''
|
||||
// document.querySelector('.statement').innerText = ''
|
||||
trigger_status = false;
|
||||
|
||||
|
||||
let plu = document.getElementById('answer_type')
|
||||
api_data = {}
|
||||
@ -462,6 +467,8 @@
|
||||
|
||||
if(end_talk == data["content"]){
|
||||
trigger_status = true
|
||||
document.querySelector('.subtitle').innerText = ''
|
||||
document.querySelector('.statement').innerText = ''
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user