Repository navigation
Add the official Voice Assistant page, with Chat History and voice language switching - #119
Open
virtitnerd wants to merge 3 commits into
Open
virtitnerd wants to merge 3 commits into
virtitnerd wants to merge 3 commits into
Conversation
Voice control robots (newFeatureSet bit 37) answer the calls the official
Voice Assistant page uses:
- get_voice_service_switch / set_voice_service_switch, which takes only the
bare {"data":1} object; the wrapped shapes time out instead of being refused
- get_current_sound for the voice language
- get_voice_history_summary and get_voice_history, read in windows of 100 ids
like the official chat page, newest 1000 at most
VoiceAssistant holds what was read; a read that fails keeps the earlier
answer. Speaker 1 is the user. Chat stamps follow the official format
(2026/11/12 09:03) and only user lines carry one, when a minute has passed.
Bit 37 is no longer listed as an advertised feature without controls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On voice control robots the Volume row in Robot settings becomes a Voice Assistant row, and the page follows the official card order: - the Voice Assistant switch, "Say Hello Rocky" and two rows of example command chips (16 phrases shuffled from the official list, as the plugin does), with "More voice interaction instructions" opening a Voice Commands page - the official voice data footnote - Volume, with the same picker Robot settings uses - Chat History, when the robot answers get_voice_history_summary, opening the robot's voice log; the user's lines draw on the right The switch and the history count are preloaded with the robot's other one-shot reads, so the page opens complete; the history itself is read only when Chat History opens. Other robots keep the Volume row as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Language row shows the robot's voice language and opens a Language page that lists its voice packs with Current or Use, as the official SoundPackagePage does. The list comes from the local server's GET /voice-pkg/info?model=<model> passthrough of the plugin's voice-pkg info file, filtered by the robot's location and sorted by voice_pri. Use sends dnld_install_sound with sid, url, md5, sver and an empty ota_url, then polls get_sound_progress and get_current_sound every 2 s until the new pack is in use, the robot reports a failure, or 5 minutes pass. Without the server route the page shows "Voice packs unavailable" with Retry, and the rest of the Voice Assistant page works as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Voice control robots such as the Qrevo Curv 2 Flow have a Voice Assistant page in the official app: the on/off switch, example commands, the voice language, the volume and the robot's chat history. LocalRock had none of it. This adds that page under Robot settings, with the official wording and behaviour, and lets you switch the robot's voice language through the local server.
Requires
What's in it
get_voice_service_switchand set withset_voice_service_switch. The set call takes only the bare{"data":1}object; the wrapped shapes the Beta switches try first time out instead of being refused, so it does not go through the Beta feature path.get_current_sound, named the way the official Language page names its packs. It opens the Language page described below.get_voice_history_summary. The page readsget_voice_historyin windows of 100 ids like the official page (newest 1000 at most) and opens on the newest line. Speaker 1 is you and draws on the right; the robot's replies draw on the left. Only your lines carry a stamp (2026/11/12 09:03), when a minute has passed since the last one.GET /voice-pkg/info?model=<model>, filtered by the robot's location and sorted byvoice_pri. Use sendsdnld_install_soundwithsid,url,md5,sverand an emptyota_url, then pollsget_sound_progressandget_current_soundevery 2 s until the new pack is in use, the robot reports a failure, or 5 minutes pass. The download and install failures use the official messages. The install runs in the view model, so leaving the page does not stop it.How it was tested
testDebugUnitTestandcompileCommonMainKotlinMetadatapass on this branch, andassembleDebugbuilds. Unit tests cover the switch reply and its bare-object params, the history summary and history replies the Curv sent, the id windows, the language names, the chat stamps (including time zone offsets and a leap day), the voice pack list filter and order,get_current_soundandget_sound_progressparsing, the install steps against the plugin's progress rules, and thednld_install_soundparams.On a Qrevo Curv 2 Flow on 2026-11-14, with the server route deployed:
get_current_soundthen reportedsid_in_use103The branch was also merged with every other open PR without conflicts.
Notes
localUtcOffsetSecondshas Android and iOS implementations next toformatCleanRecordTime.