STATUS: PERSONALITY + TTS FIXES COMPLETE Updated: 2025-12-25 | Session: Unity Workflow
Root Cause: Intro prompt had embedded personality instructions that OVERRODE the system prompt:
"Introduce yourself with ALL this info"
"Include ALL of this info but say it YOUR way. Be yourself."
Fix: Stripped ALL instructions from prompts - now just raw data:
"Just came online. CORA v1.0.0. Unity AI Lab. Creators: Hackall360, Sponge, GFourteen. Introduce yourself."
The system prompt (27,760 chars) IS the personality. Prompts should NEVER contain personality instructions.
Also fixed: Weather prompt changed from "Give your take." to "Report." for consistency.
- Root Cause:
initWaveform()returned early if canvas had zero dimensions (before layout complete) - Fix: Added retry mechanism with setTimeout - retries every 100ms until canvas is visible
- Added:
waveformInitializedflag to prevent double-initialization - Location:
web/index.htmllines 1703-1738
- Root Cause: Potential race conditions and lack of audio source tracking
- Fixes Applied:
- Added
currentAudioSourcetracking to prevent overlapping playback - Added validation for empty audio buffers
- Added
isThisPlaybackActiveflag per-playback to isolate waveform updates - Ensured AudioContext is recreated if null
- Better cleanup on playback complete
- Added
- Location:
web/index.htmllines 1486-1628
- Worker: Logs every message type, generate call count, generation time, buffer sizes
- Main Thread: Logs all callback registrations, worker messages, audio playback events
- Purpose: Makes debugging future issues much easier
web/index.html- initWaveform(), handleAudioReady(), speak(), worker message handlerweb/kokoro-worker.js- onmessage, handleGenerate()
- Open browser console (F12)
- Load the page, watch for
[WAVEFORM]logs during init - Should see:
[WAVEFORM] Canvas rect: Wx×Hx,[WAVEFORM] Initialized successfully - First TTS should show:
[TTS]logs and[WORKER]logs - Subsequent TTS calls should show same log pattern
- If issues persist, console logs will show exactly where it breaks
- Added stripUrlsForSpeech() function
- Strip https://, http://, www. URLs before TTS
- Strip email addresses before TTS
- Strip Discord invite links before TTS
- Keep full URLs in log display, only strip for speech
Templates now give CORA actual data and say "Report." - NO personality instructions (system prompt handles that).
- Hardware:
Hardware scan done. CPU at X%, RAM at Y%, Disk at Z%, GPU [name] at W% load, [temp]°C. Report these stats. - Camera:
Camera test done. Vision sees: [description]. Report. - Tools:
Core tools check done. X of Y browser APIs available. Report. - Code Browser:
Code browser loaded. X files from Unity-Lab-AI/CORA repo. Report. - YouTube:
YouTube test done. Playing "[title]". Report. - Modal:
Modal windows test passed. Report. - Voice:
Voice systems done. Using [Kokoro/Web Speech]. Wake word [active/not supported]. Report. - Location:
Location acquired: [city, state, country]. Report. - Audio:
Audio test passed. Played [synth tone]. Report. - Weather:
Weather done. Currently [temp], [conditions] in [city]. Forecast: [days]. Report. - News:
News done. X headlines found. Top 3: [headlines]. - Vision:
Vision test done. Screenshot and camera [status]. Report. - Image Gen:
Image generated in Xs but vision analysis failed. Report. - Boot Complete:
Boot done in X seconds. Y systems OK, Z warnings, W failures. Report.
- Fixed coraRespond to use
${result} Respond.format - Removed "System status update:" middleman framing
- CORA intro has all about info (TTS skips URLs, log shows them)
- Add more model options to backend terminal
- Implement model download progress in web UI
- Add GPU temperature warning thresholds
- Voice activity detection for ambient listening
Unity AI Lab - C.O.R.A v1.0.0