debug(voice): mount + tap логи в консоль
All checks were successful
Deploy / deploy (push) Successful in 2m14s
All checks were successful
Deploy / deploy (push) Successful in 2m14s
This commit is contained in:
@@ -67,6 +67,7 @@ export default function VoiceController() {
|
||||
const busyRef = useRef(false)
|
||||
|
||||
useEffect(() => {
|
||||
console.log('[VoiceController] mounted, state=idle, ждём тап на микрофон')
|
||||
return () => {
|
||||
try { vadRef.current?.destroy?.() } catch {}
|
||||
try { wakeRef.current?.stop?.() } catch {}
|
||||
@@ -218,6 +219,7 @@ export default function VoiceController() {
|
||||
// Долгий тап = ручной триггер (как раньше push-to-talk). Короткий — toggle вкл/выкл.
|
||||
// Для простоты сейчас: короткий тап в idle = активация; короткий тап в active = выкл.
|
||||
const onTap = async () => {
|
||||
console.log(`[VoiceController] tap! state=${state}`)
|
||||
if (state === 'idle' || state === 'error') {
|
||||
await start()
|
||||
} else if (state === 'listening') {
|
||||
|
||||
Reference in New Issue
Block a user