chore(tts-debug): add temporary console debug logs for speed changes and state

This commit is contained in:
Gigi
2025-10-20 22:22:38 +02:00
parent 7594d30fd2
commit bbed20d679
2 changed files with 17 additions and 13 deletions

View File

@@ -36,7 +36,9 @@ const TTSControls: React.FC<Props> = ({ text, defaultLang, className, settings }
const handleCycleSpeed = () => {
const currentIndex = SPEED_OPTIONS.indexOf(rate)
const nextIndex = (currentIndex + 1) % SPEED_OPTIONS.length
setRate(SPEED_OPTIONS[nextIndex])
const next = SPEED_OPTIONS[nextIndex]
console.debug('[tts][ui] cycle speed', { from: rate, to: next, speaking, paused })
setRate(next)
}
const playLabel = !speaking ? 'Listen' : (paused ? 'Resume' : 'Pause')