main
reng 3 months ago
parent 3a104bf704
commit 07febf5a8f
  1. 3
      vite/package.json
  2. 14
      vite/src/pages/flow_free.jsx
  3. 1
      vite/src/util/osc.js

@ -7,7 +7,8 @@
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
"preview": "vite preview",
"deploy":"tauri build && copy /Y src-tauri\\target\\release\\app.exe C:\\uc\\24070-Sync\\app.exe"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.8",

@ -93,6 +93,7 @@ export function FreeFlow(){
reset();
sendOsc(OSC_ADDRESS.CHOICE, 'reset');
sendOsc(OSC_ADDRESS.SPEECH, 'stop');
}
function onOsc(payload){
@ -233,6 +234,9 @@ export function FreeFlow(){
if(!cue) return;
console.log('Playing cue:', cue);
// stop audio
if(refAudio.current) refAudio.current.pause();
@ -437,6 +441,8 @@ export function FreeFlow(){
function onSpeechEnd(){
sendOsc(OSC_ADDRESS.SPEECH, 'stop');
if(currentCue?.type!='chat') return; // Only process if current cue is user input
if(chatStatus!=ChatStatus.User) return; // Only process if chat status is User
@ -555,9 +561,11 @@ export function FreeFlow(){
if(refPauseTimer.current) clearTimeout(refPauseTimer.current);
refSpeechPaused.current=false;
}
sendOscStatus(OSC_ADDRESS.CLIENT_INPUT, `${data.id}#${transcript}`); // Send current input via OSC
sendOscStatus(OSC_ADDRESS.CLIENT_INPUT, `${data.id}#${transcript}`);
// Send current input via OSC
}
sendOsc(OSC_ADDRESS.SPEECH, 'start');
},[transcript]);
@ -626,6 +634,8 @@ export function FreeFlow(){
}else{
playCue(next);
setNextCue(null);
}

@ -17,6 +17,7 @@ export const OSC_ADDRESS={
DISCARD: 'discard',
PASSWORD: '/password',
HINT:'/hint',
SPEECH:'/speech',
CLIENT_STATUS:'/client',
CLIENT_INPUT:'/client_input',

Loading…
Cancel
Save