Commit graph

637 commits

Author SHA1 Message Date
8dffac24f9 Add diagnostic logging to streaming TTS 2026-01-27 09:53:37 -05:00
46048a3251 Fix Firefox streaming: use browser-detected format instead of hardcoded mp3 2026-01-27 09:51:24 -05:00
4ae6b4fbbd Use webm+opus for Firefox TTS streaming via MediaSource
Firefox supports audio/webm;codecs=opus in MediaSource API,
enabling true streaming playback. Remove broken progressive
playback (partial blobs don't stream). Simplified fallback
to full buffer for any browser without MSE support.
2026-01-27 09:29:02 -05:00
03147f028d Fix progressive playback: add error handling, response.body check
Progressive playback was silently failing if response.body was null
or if the reader threw. Now falls back to full buffer if body isn't
streamable, logs chunk progress, and properly unblocks callers on
error instead of hanging forever.
2026-01-27 09:23:37 -05:00
cc1d21ade0 Progressive playback for Firefox, add Qwen3-TTS to TTS page
Firefox can't use MediaSource for streaming. Instead of buffering
the entire response before playing, progressively read chunks and
start playback after ~8KB arrives. Replaces audio src with complete
blob when download finishes for seeking support.

Update text-to-speech.html to document Qwen3-TTS as the default
5th engine with 20 cloned voices and 10-language support.
2026-01-27 09:20:39 -05:00
1a2a85c797 Use UA detection for audio format instead of canPlayType
Firefox on Linux reports canPlayType('audio/mpeg') as supported
but then fails to decode mp3. Use user-agent detection instead:
Firefox always gets opus (ogg), Chromium browsers get mp3.
2026-01-27 08:23:06 -05:00
74a1ea581c Detect browser audio codec support, use opus for Firefox
Firefox on Linux lacks mp3 decoders. Detect browser capabilities
at load time: use mp3 for Chrome, opus (ogg) for Firefox.
MediaSource streaming only works with mp3 (Chrome); Firefox
falls back to buffered playback with opus format.
Sends response_format parameter to TTS server.
2026-01-27 08:19:24 -05:00
3019fd0e15 Route all TTS through handleTTS for streaming support
- speakChatText now uses handleTTS instead of speakTextDirect
  so embed modal TTS (intro, chat messages) respects streaming mode
- Streaming result updates blobUrl on completion so existing
  download click handlers work without changes
2026-01-27 08:12:47 -05:00
ab13f2c19f Disable gpt-oss.ai.unturf.com endpoint (returns 404) 2026-01-27 08:12:07 -05:00
519e281623 Fix streaming TTS to return audio immediately, collect stream in background
- speakTextStreaming now returns immediately with the audio element
  already playing, plus a done promise for when the stream completes
- Modal wires up controls immediately using the live audio element
- Pause/play works during streaming (stream continues in background)
- Button shows "Streaming..." while receiving, switches to "Pause" when done
- Download button enables only after stream completes
- All TTS functions now return consistent done promise interface
2026-01-27 07:36:00 -05:00
81dbae3c7a Add streaming TTS playback mode with MediaSource API
Default to streaming mode which plays audio as chunks arrive
from the server instead of buffering the entire response.
Adds a Buffered/Streaming toggle in the TTS modal.
Falls back to buffered if MediaSource doesn't support audio/mpeg.
2026-01-27 07:32:18 -05:00
10c67ae4e2 Fix TTS model default: use tts-1-qwen instead of tts-1
The backend only has tts-1-qwen registered. Requests with model=tts-1
were failing with KeyError: 'tts-1'.
2026-01-26 18:41:38 -05:00
7018490249 Fix TTS URLs to use speech.ai.unturf.com 2026-01-26 18:13:02 -05:00
ed4b599895 Switch TTS to 3090-ai server (20 voices) 2026-01-26 17:32:51 -05:00
15e7e4c7c7 Update TTS modal to support 20 Qwen3-TTS voices
- Fix API response format parsing (data.data[].voices -> flat array)
- Update fallback voices from 6 to 20
- Bump cache version to v3 to force refresh
2026-01-26 17:25:20 -05:00
3d1c06c1c1 Add sitemap.xml for Google indexing 2026-01-26 13:04:14 -05:00
bfc03de5ef Add Google site verification 2026-01-26 13:02:46 -05:00
0ac9ba7430 Update C# examples with .NET 10 and Mono sections 2026-01-26 12:48:07 -05:00
6c0dfcb4ca Add C examples page, fix nav links to use correct paths 2026-01-26 12:44:30 -05:00
cce700e705 Add C and C# Implementations links to all page navs 2026-01-26 12:25:02 -05:00
c40f5e0bc0 Add C and C# portal pages, dotnet10/mono variants, c# symlink 2026-01-26 11:08:14 -05:00
44a3876db6 Fix model refresh to show partial success when TTS is down 2026-01-26 10:29:15 -05:00
83c5066948 new file: docs/VAULT_SYNC_DESIGN.md 2026-01-26 10:07:02 -05:00
2fbefde281 Fix: make vaultSection and settingsContent span full width of parent grid 2026-01-23 12:00:22 -05:00
ae22b1a906 Fix layout: explicit grid styles, full width elements 2026-01-23 11:44:24 -05:00
cd1a6ea190 Fix: call buildVaultUI after settingsContent is set up 2026-01-23 11:31:11 -05:00
011ecef046 Fix settings layout: align content to start, reduce gaps 2026-01-23 11:27:10 -05:00
5d3d7ed18c Fix settings layout: balanced two-column grid 2026-01-23 11:19:05 -05:00
f64cc45d59 Make unlocked vault bar thinner, full width at top 2026-01-23 11:17:04 -05:00
69a069701e Fix unlocked vault state - reset styles, compact layout 2026-01-23 11:14:08 -05:00
0966857cc6 Center vault form vertically with CSS grid place-content 2026-01-23 10:49:59 -05:00
f7bb6fecae Remove width constraints on vault form for mobile compatibility 2026-01-23 10:45:36 -05:00
b14e43f200 Center vault form with CSS grid, split text, button says Unlock Settings 2026-01-23 10:41:57 -05:00
5c37bf35b8 Fix: hide settings until vault unlocked 2026-01-23 10:38:48 -05:00
25d27be681 Remove vault settings dialog (no password change/delete) 2026-01-23 10:33:19 -05:00
2ff6c6b1a3 Simplify vault UI: remove confirm password, settings hidden until unlocked 2026-01-23 10:31:41 -05:00
5159355c98 Change to unlimited session persistence until explicitly locked 2026-01-23 09:53:12 -05:00
9944d8f757 Initialize vault in main entry point
- Import and export UncloseVault
- Load CryptoJS dynamically for vault encryption
- Initialize vault on page load (auto-restores session if valid)
- Expose vault globally via window.UncloseVault
2026-01-23 09:47:18 -05:00
3d07909854 Add vault system for encrypted settings storage
- Add vault.js: encrypted settings with AES-256 + 7-day session persistence
- Integrate vault UI in settings modal with friendly messaging
- Update config.js and un.js to use vault for credentials
- Add translation strings for vault UI (en.js)
- Show "Logged in" status with Lock button instead of session info
- Vault password only asked when opening settings
2026-01-23 09:46:56 -05:00
637064bf99 Rename browser SDK to un.js to match official naming 2026-01-23 08:36:08 -05:00
52b08894c6 Add unsandbox.com API key settings to modal
- Add public/src/unsandbox.js browser SDK with HMAC-SHA256 auth
- Add settings UI for unsandbox public/secret keys in modal
- Refactor code-execution.js to use SDK when keys configured
- Falls back to unauthenticated endpoint when not configured
- Add English translations for new settings
2026-01-23 08:34:18 -05:00
a00c7fd9e2 Add official unsandbox.com JavaScript SDK
- Add lib/un.js (official async SDK from unsandbox.com)
- Add update-unsandbox-sdk Makefile target for SDK updates
- Note: SDK is Node.js-based, browser code-execution.js remains separate
2026-01-23 08:29:07 -05:00
070e3ae591 Use uncloseai.com tag for runner 2026-01-12 11:16:28 -05:00
0aa20fd8b8 Remove tag requirement - runner is project-specific 2026-01-12 11:14:42 -05:00
2784aeda13 Deploy to new proxy server 2026-01-12 11:13:38 -05:00
53a84734ea Trigger deploy to new proxy 2026-01-12 11:09:33 -05:00
4b434b0222 Retrigger deployment 2026-01-12 11:07:08 -05:00
e82591cd75 Update runner tag to proxy.uncloseai.com for new proxy server 2026-01-12 11:03:10 -05:00
e1366fe2c7 Add explicit CRITICAL language instruction for intro generation 2026-01-03 14:06:37 -05:00
2fecc5848a Fix getUserLanguagePreference to check UNCLOSEAI_LANGUAGE for intro generation 2026-01-03 13:46:45 -05:00