Skip to content

Add speech-to-text input and demo mode for mobile#250

Merged
kubaflo merged 1 commit intoPureWeen:mainfrom
kubaflo:feature/speech-to-text
Mar 1, 2026
Merged

Add speech-to-text input and demo mode for mobile#250
kubaflo merged 1 commit intoPureWeen:mainfrom
kubaflo:feature/speech-to-text

Conversation

@kubaflo
Copy link
Copy Markdown
Collaborator

@kubaflo kubaflo commented Mar 1, 2026

Summary

Adds voice input support via a mic button in the chat input row, and exposes Demo mode on mobile (debug builds only) for testing without a remote connection.

Speech-to-Text

  • Mic button between attach and send buttons using CommunityToolkit.Maui ISpeechToText
  • Compact floating popover with pulsing red mic indicator, live transcript, and send button
  • Click to start/stop recording; send button submits recognized text immediately
  • Accumulates partial results (Apple platforms deliver word-by-word deltas)
  • Platform permissions: RECORD_AUDIO (Android), NSMicrophoneUsageDescription + NSSpeechRecognitionUsageDescription (iOS/MacCatalyst), microphone capability (Windows), com.apple.security.device.audio-input entitlement (MacCatalyst)

Build Fixes

  • Post-build MSBuild targets inject privacy plist keys for iOS and Mac Catalyst (MAUI build strips NS*UsageDescription keys from compiled plists)
  • iOS target re-signs the app bundle after plist modification
  • TrimmerRootAssembly for CommunityToolkit.Maui + CommunityToolkit.Maui.Core to prevent IL linker from stripping speech implementation types

Demo Mode

  • Expose ConnectionMode.Demo on mobile in #if DEBUG builds
  • Adds play icon and description in Settings page
  • Connection section visible on mobile even before initialization (so users can switch to Demo)

Files Changed

  • ExpandedSessionView.razor / .razor.css — mic button, popover UI, STT logic
  • Settings.razor — Demo mode icon, description, visibility guard
  • MauiProgram.cs — CommunityToolkit.Maui + ISpeechToText registration
  • PlatformHelper.cs — Demo in mobile AvailableModes (DEBUG only)
  • PolyPilot.csproj — package, trimmer roots, plist injection targets
  • Platform plists/manifests — permissions
  • index.htmlappendSpeechText JS helper

- Add mic button in chat input row using CommunityToolkit.Maui ISpeechToText
- Compact floating popover shows pulsing red mic, live transcript, and send button
- Toggle to start/stop recording; send button submits recognized text immediately
- Accumulate partial results (word-by-word on Apple platforms)
- Add platform permissions: RECORD_AUDIO (Android), NSMicrophoneUsageDescription +
  NSSpeechRecognitionUsageDescription (iOS/MacCatalyst), microphone (Windows),
  audio-input entitlement (MacCatalyst)
- Post-build MSBuild targets inject privacy plist keys for iOS and Mac Catalyst
  (MAUI build strips NS*UsageDescription keys) with re-signing for iOS
- Add TrimmerRootAssembly for CommunityToolkit.Maui to prevent IL linker stripping
- Expose Demo connection mode on mobile in debug builds for testing chat UI
  without needing a remote server connection
- Add Demo mode icon and description in Settings page

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kubaflo kubaflo merged commit b35f1a2 into PureWeen:main Mar 1, 2026
PureWeen added a commit that referenced this pull request Mar 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant