feat(desktop): import local Pocket voices - #3259
Draft
johnmatthewtennant wants to merge 3 commits into
Draft
Conversation
johnmatthewtennant
added a commit
that referenced
this pull request
Jul 28, 2026
Contributor
Author
johnmatthewtennant
force-pushed
the
jtennant/pocket-tts-settings-v1
branch
from
July 28, 2026 04:48
4891a92 to
c118f5a
Compare
johnmatthewtennant
force-pushed
the
jtennant/pocket-voice-import
branch
from
July 28, 2026 04:54
c06a505 to
3fb3c74
Compare
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
johnmatthewtennant
force-pushed
the
jtennant/pocket-voice-import
branch
from
July 28, 2026 05:02
3fb3c74 to
c5832db
Compare
Signed-off-by: John Tennant <jtennant@squareup.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.

Context
Pocket TTS currently offers only bundled reference voices. People need a local, private way to add another voice without sending audio through the renderer or a cloud service.
Summary
This adds a minimal Pocket voice import flow to the existing Voice settings card. Buzz opens the native macOS file picker, validates and canonicalizes the selected WAV in Rust, stores it in app data under a content-derived identity, selects it, and lets the user safely delete it later.
The import and audio lifecycle is exercised directly through the reusable
buzz-voicecrate. The deterministic path imports a real WAV, reloads persisted state, synthesizes and inspects PCM with the selected voice, interrupts synthesis without releasing partial audio, deletes the voice, and proves the exact Mary fallback. A BlackHole loopback test also plays generated PCM through a real Core Audio device and captures a non-silent signal.Changes
pocket:imported:<sha256>voice identities and content-addressed app-data files.buzz-voice; the Tauri module is a thin native-picker adapter.Related issue
None found.
Testing
Passed:
cargo test -p buzz-voice: 15 passed; the two hardware/model tests compiled and remained explicitly ignored by default.cargo test --manifest-path desktop/src-tauri/Cargo.toml huddle:: --lib: 109 passed, including the thin assistant-message routing test.cd desktop && pnpm run build:e2e.cd desktop && pnpm exec playwright test tests/e2e/voice-settings.spec.ts --project=smoke: 5 passed, including import/select/delete, imported and Mary preview routing, picker cancellation, and invalid input.Only subjective listening quality remains for manual validation. The native picker boundary, objective signal production, huddle routing, deletion fallback, interruption, and unintended-audio conditions are automated.
Screenshots
Final Voice settings surface with the bundled and imported Pocket voice selector, preview, and local Add voice action:
Reviewer-reproducible examples
The commands below use the checked-in Marius WAV as the import fixture. Launch Buzz once and install the Pocket TTS model before running them; the default model directory is
~/.buzz/models/pocket-tts.1. Exercise the objective import and audio lifecycle
Observed output excerpt:
{ "persistence": "reloaded", "interruption": "partial PCM discarded", "emptyInputSamples": 0, "afterDelete": "pocket:mary", "importedPreview": { "sampleRate": 24000, "samples": 59520, "nonSilentSamples": 29477 }, "maryFallbackPreview": { "sampleRate": 24000, "samples": 78720, "nonSilentSamples": 57285 } }The test writes
imported-preview.wavandmary-fallback-preview.wavunderdesktop/test-results/voice-audiofor optional subjective listening.2. Play and capture generated audio through BlackHole
With the free
BlackHole 2chCore Audio device installed:Observed output excerpt:
{ "device": "BlackHole 2ch", "captured": { "sampleRate": 48000, "samples": 265216, "nonSilentSamples": 100534, "peak": 0.04569, "rms": 0.00406 } }The test selects BlackHole by name and does not change the system default input or output.
3. Exercise the desktop controls and native-picker boundary outcomes
Observed result:
The UI suite proves imported selection and Preview routing, deletion and Mary Preview routing, native-picker cancellation with no audio command, and invalid or unsupported input with no selection change. Real WAV validation, persistence, synthesis, playback, capture, interruption, deletion, and fallback are covered by the two crate-level paths above.