Skip to content

Emit transcript deltas and document iOS limitations - #5

Merged
roprgm merged 4 commits into
mainfrom
agent/preserve-transcript-edits
Jul 25, 2026
Merged

roprgm merged 4 commits into
mainfrom
agent/preserve-transcript-edits

Conversation

@roprgm

@roprgm roprgm commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • expose raw transcript deltas through onDelta
  • move text composition into the demo with a functional state update
  • avoid re-emitting the final transcript after streamed deltas
  • document the native speech recognition limitation on iOS and iPadOS

Why

The provider previously accepted the full editor value and decided how to append transcription text. That coupled microphone/transcription behavior to textarea composition and made edits during recording vulnerable to stale value snapshots.

The component now emits deltas and leaves insertion, spacing, cursor handling, and alternate rendering strategies to the consumer. Internally it only tracks whether a delta arrived so a final-only transcriber can still emit its result once.

API

  • replace value and onValueChange with optional onDelta
  • remove the accumulated transcript from useChatVoiceInput()

Validation

  • pnpm test — 31 tests passed
  • pnpm typecheck — includes package and demo builds
  • pnpm exec biome check src/provider.tsx demo/main.tsx tests/provider.test.tsx README.md
  • git diff --check

@vercel

vercel Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-voice-input Ready Ready Preview, Comment Jul 25, 2026 9:57pm

Request Review

@roprgm
roprgm marked this pull request as ready for review July 25, 2026 21:42
@roprgm roprgm changed the title Preserve transcript edits and document iOS limitations Emit transcript deltas and document iOS limitations Jul 25, 2026
@roprgm
roprgm merged commit df4887a into main Jul 25, 2026
5 checks passed
@roprgm
roprgm deleted the agent/preserve-transcript-edits branch July 25, 2026 21:58

This branch was successfully deployed

1 active deployment
Preview — 964cfe4f Deployed Jul 25, 2026 by vercel[bot]
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