ULTRACOMBOS-DEV 2 months ago
parent f13b2dc8e5
commit 815a695cd9
  1. 7
      vite/public/cuelist_0923.json
  2. 27
      vite/src/pages/flow_free.jsx

@ -55,17 +55,18 @@
"id": 4.1,
"name": "Q4.1",
"type": "phone",
"description": "輸入完成,請描述腦中的記憶畫面",
"description": "撥打音效",
"auto": false,
"audioFile": "assets/combine/Q4-1_撥打音效.mp3",
"loop": true,
"nextcue": 4.11
"nextcue": 4.11,
"fadeout": true
},
{
"id": 4.11,
"name": "Q4.11",
"type": "phone",
"description": "裝置啟動音效",
"description": "裝置啟動",
"auto": true,
"audioFile": "assets/combine/Q4-1-1.mp3",
"nextcue": 4.2,

@ -321,16 +321,17 @@ export function FreeFlow(){
}
}
if(!announce) return;
if (announce.volume > 0) {
announce.volume = Math.max(0, announce.volume - 1.0/(AUDIO_FADE_TIME/100)); // Decrease volume gradually
} else {
//clearInterval(fadeOutInterval);
announce.pause();
announce.volume = 0; // Reset volume for next play
if(announce){
if (announce.volume > 0) {
announce.volume = Math.max(0, announce.volume - 1.0/(AUDIO_FADE_TIME/100)); // Decrease volume gradually
} else {
//clearInterval(fadeOutInterval);
announce.pause();
announce.volume = 0; // Reset volume for next play
}
}
if(audio?.volume==0 && announce?.volume==0){
if((audio==null || audio.volume==0) && (announce==null || announce.volume==0)){
clearInterval(fadeOutInterval);
if(callback) callback();
}
@ -517,11 +518,9 @@ export function FreeFlow(){
}
if(cue.hint!=null && cue.hint_time==null){
sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message
}else{
sendOsc(OSC_ADDRESS.HINT, ''); // Clear hint message
}
sendOsc(OSC_ADDRESS.HINT, ''); // Clear hint message
sendOsc(OSC_ADDRESS.SPEECH, 'stop');
if(cue.numpad_type=='choice'){
@ -710,7 +709,7 @@ export function FreeFlow(){
useEffect(()=>{
// console.log('Final transcript changed:', finalTranscript);
console.log('Final transcript changed:', finalTranscript);
if(finalTranscript.trim().length > 0) {
onSpeechEnd();
}

Loading…
Cancel
Save