Skip to content

feat(voice): expose reusable voice runtime - #282

Open
johnmatthewtennant wants to merge 42 commits into
mainfrom
jtennant/berd-voice-extraction
Open

feat(voice): expose reusable voice runtime#282
johnmatthewtennant wants to merge 42 commits into
mainfrom
jtennant/berd-voice-extraction

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Berd's voice stack was spread across Tauri command modules, which made engine behavior difficult to test independently and kept reusable voice policy coupled to the desktop shell. This PR introduces a berd-voice Rust crate that owns speech recognition, synthesis, voice activity detection, turn admission, interruption, delivery tracking, and bounded engine lifecycle. Berd remains linked to the runtime in-process, while its Tauri hosts retain device I/O, window authorization, and renderer projection.

The runtime provides one session model for Siri and macOS Speech, Pocket and Parakeet, and OpenAI. It also provides command-line surfaces for voice and model management, file synthesis, deterministic benchmarks, and host-provided PCM sessions. Live voice and rate changes, false-barge recovery, and spoken-prefix delivery reporting use the same runtime contracts as the app.

Testing

In a local Berd development build:

  1. Started voice sessions with native Apple and local Pocket/Parakeet engines.
  2. Changed voices, speech rates, microphone inputs, and speaker outputs during active sessions and confirmed the authoritative settings updated.
  3. Interrupted assistant playback and confirmed the delivered prefix was preserved; triggered provisional voice activity without a final transcript and confirmed playback resumed rather than restarting.
  4. Repeated multi-turn recognition and playback, including application restart and clean shutdown paths.

@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review September 3, 2026 11:29
@johnmatthewtennant
johnmatthewtennant requested a review from a team September 3, 2026 11:29

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

Engineering found one blocking startup-lifecycle defect in the new external voice session. Supplied GitHub evidence is structurally valid and shows all 10 captured checks passing; no prior review threads were supplied.

Deterministic publication result: 1 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Comment thread src-tauri/crates/berd-voice/PROTOCOL.md Outdated
morgmart
morgmart previously approved these changes Sep 3, 2026

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

Engineering completed a fresh static review of the full exact PR comparison and found no publishable findings. The prior startup-readiness defect is fixed at this head and its resolved thread has a substantive human reply. Supplied GitHub evidence is structurally valid; five captured checks passed and three were still in progress, so required checks still govern merge readiness.

Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.

Pending checks: 2 check(s) are not complete.

This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.

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.

2 participants