Repository navigation
MS-26473 PDChat: wake phrase for Voice Mode, and demo controls for every voice option - #233
Merged
Merged
Conversation
…ry voice option With IChatService.WakePhrases set, a microphone that hears no word for VoiceIdleTimeout (default 10 seconds) goes Dormant: nothing is typed or sent until a wake phrase is heard, matched ignoring case and punctuation, and only the words after it are typed. It never goes dormant while the text box has focus or a send is pending. PDChatVoiceState.Dormant is appended to the enum. DumbChatService makes its voice endpoints, agents, models, wake phrases, idle timeout, auto-send delay, read-aloud and selections settable, each raising OnConfigurationChanged, and the PDChat demo page gains a Voice and Assistant section to drive them. The simulated microphone starts every other utterance with "Hey DumbBot," so the wake phrase can be seen working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 52 |
| Duplication | 0 |
🟢 Coverage 95.04% diff coverage · -0.04% coverage variation
Metric Results Coverage variation ✅ -0.04% coverage variation Diff coverage ✅ 95.04% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (7756e23) 15856 15843 99.92% Head commit (3d13d99) 15970 (+114) 15951 (+108) 99.88% (-0.04%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#233) 121 115 95.04% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
…ent test data The dormant helper waited for VoiceState only, so on a slower runner the markup could still show the listening status when the test read it. It now waits for the rendered dormant status. Adds the XML comment CI requires on the public TheoryData member. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of MS-26473.
What
IChatService.WakePhrases(defaultnull, off) andIChatService.VoiceIdleTimeout(default 10 seconds), both default interface members backed byChatServiceDefaultState. With wake phrases set, Listening with no word for the idle timeout moves to the newPDChatVoiceState.Dormant(appended, no renumbering). It never goes dormant while the text box has focus or an auto-send is pending. While dormant, words are not typed and pauses never send; a rolling buffer of normalised words (lowercase, letters and digits only) is matched against each phrase, so "HEY dumbbot," wakes it, and only the words after the phrase are typed. A host that reports only pauses can wake it from the turn text. The microphone keeps streaming while dormant, and theWakePhrasesremarks tell hosts to make that clear to users.Waiting for "<first phrase>"…; the microphone button stays on, says it is waiting, and pressing it turns Voice off.DumbChatServicenow has settableVoiceEndpoints,Agents,Models,WakePhrases,VoiceIdleTimeout,VoiceAutoSendDelay,IsReadAloudEnabled,SelectedAgentIdandSelectedModelId, each raisingOnConfigurationChanged. The PDChat page has a Voice and Assistant section for all of them, and the documentation describes the toolbar, read-aloud, models and wake phrase. The simulated microphone starts every other utterance with "Hey DumbBot," so the wake phrase can be demonstrated.Verification
dotnet build PanoramicData.Blazor.Test -c Release: 0 errors, 0 warnings.PanoramicData.Blazor.Webalso builds clean (apart from its existing not-packable notice).PDChatTests.WakePhrase.csandDumbChatServiceVoiceTests.cs). The PDChat and demo-service classes were rerun five times with no failure./pdchatrenders the new section and the simulated voice module is served. The interactive wake in a real browser was not exercised.🤖 Generated with Claude Code