feat(ai-components): language-neutral alert tones + guided WeChat UI fixes - #713
Merged
Merged
Conversation
… pack Replace the localized voice prompts with short synthesized tones when ENABLE_AI_ALERT_TONE is enabled (now the default): - add 4 semantic tones (success / wait / fail / wake) as MP3 C arrays, generated from assets/media/tone_*.mp3 - map all local alert types onto the 4 tones in media_src.h - compile out the zh/en speech packs while tones are enabled, keeping the sources in tree so voice prompts come back by disabling the option The language option still drives on-screen text; only alert playback changes. Set ENABLE_AI_ALERT_TONE=n to restore the speech packs. Co-Authored-By: Claude Code <noreply@anthropic.com>
guided_wechat_state_read() runs from the 1 Hz UI refresh timer and called tuya_authorize_read() on every invocation, re-reading uuid/authkey from KV flash once per second and logging "Authorization read succeeds." at the same rate. The storage license never changes at runtime (no code path writes it after boot and the UI offers no authorization reset), so read it once and serve the cached pointers. The pointers target the authorize module persistent buffers, which stay valid for the firmware lifetime. Co-Authored-By: Claude Code <noreply@anthropic.com>
While pairing runs, BLE and AP netcfg operate in parallel. Surface the
live AP hotspot name under the guide QR so an app-less phone can join
the hotspot and reach the captive setup page.
- ap_netcfg: store hotspot ssid/ip when the SoftAP starts and expose a
read-only getter
- guided wechat state: carry ap_ssid/ap_ip in the device state snapshot
- guided wechat UI: one muted hint line under the QR
("配网热点:<ssid>" / "Setup hotspot: <ssid>"), only while pairing is
live and the hotspot is up
Co-Authored-By: Claude Code <noreply@anthropic.com>
yingtao450
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three changes for the AI components, verified end-to-end on TUYA_T5AI_BOARD.
1. Language-neutral local alert tones (
ENABLE_AI_ALERT_TONE)ai_components(defaulty): all local alertsplay short language-neutral tones (success / wait / fail / wake, ~15 KB of
MP3 assets) instead of localized speech.
are excluded from the build entirely. Sources are kept; set
ENABLE_AI_ALERT_TONE=nto restore the voice prompts.media_src.hand compileguards on the speech pack sources.
2. Fix 1 Hz KV re-read in guided WeChat state
the stored uuid/authkey from KV flash on every tick (one flash read plus
an "Authorization read succeeds." log line per second).
cached (the authorize module returns pointers to persistent buffers).
3. Show SoftAP hotspot name during pairing
guided network page now shows the live hotspot name
("配网热点:SmartLife-XXXX" / "Setup hotspot: ...") under the guide QR,
giving app-less phones a path to the captive setup page.
ap_netcfgstores the hotspot ssid/ip when the SoftAP starts and exposesa read-only getter; the UI reads it from the existing 1 Hz state snapshot
(RAM copy only, no extra IO).
Notes for reviewers
ENABLE_AI_ALERT_TONE=ychanges the default alert behavior from localizedspeech to tones. Projects that need voice prompts can set it to
n; thezh / en packs then build again unchanged.
compile to empty stubs) and on-device smoke tests, including an app with
no explicit language / tone config lines.
🤖 Generated with Claude Code