Repository navigation
berd-call: keep the saved Spokesperson voice across session restarts - #414
Closed
johnmatthewtennant wants to merge 1 commit into
Closed
johnmatthewtennant wants to merge 1 commit into
johnmatthewtennant wants to merge 1 commit into
Conversation
A restart replaced the saved arguments with the new session's, so turning the Spokesperson off (a mode that can't carry --spokesperson-voice and --spokesperson-rate) erased them, and turning it back on started with the default voice. Keep them as call start does, and start a restart that can carry them with the saved voice unless it sets its own. Signed-off-by: John Tennant <jtennant@block.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
🤖 Folded into #416 for review and merge. |
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
berd-callsaves the call's session options, including--spokesperson-voiceand--spokesperson-rate, in its saved settings file. Those two flags are only valid with--mode expert-spokesperson --allow-direct-agent-speech. Call start already keeps them for later when the call doesn't take them ("Calls whose replies don't have their own voice keep the Spokesperson's for later").Problem
Turning the Spokesperson off and back on resets its voice to the default, marin. Turning it off restarts the session into conventional mode, and
SessionActor::restart_startreplaced the saved arguments with the new session's persistable arguments, which can't contain the Spokesperson flags. The saved voice and rate were lost, and turning it back on (from the CLI or the menu bar, which both go throughset_spokesperson_mode) built its restart arguments from the live session, which also had no voice.Solution
restart_startnow merges the new session's arguments over the saved Spokesperson flags, as call start does, so they survive a restart into a mode that can't carry them. When the restart's session takes them (direct agent speech) and doesn't set--spokesperson-voiceitself, it starts with the saved voice. The rate is deliberately not injected, since the Spokesperson's speed follows the agents' on a toggle. Explicit flags win. Both the CLI and menu bar toggles share this restart path, so no other change is needed.Validation
New test
restart_keeps_the_saved_spokesperson_voice_for_latercovers a restart into conventional mode (flags stay saved only), into expert-spokesperson with direct speech (saved voice added to the session arguments), and with an explicit voice (explicit wins).left: ["--mode", "conventional"],right: ["--spokesperson-voice", "cedar", "--spokesperson-rate", "1.1", "--mode", "conventional"].test host_session::tests::restart_keeps_the_saved_spokesperson_voice_for_later ... ok.cargo test -p berd-call --no-fail-fast: the same 5 tests fail on origin/main with and without this change (openai_spokesperson::tests::input_cutover_waits_for_committed_transcription_terminal,host_session::tests::spokesperson_results_change_and_save_only_its_voice,management_usage_errors_are_exit_two_and_do_not_emit_json,unresolved_handoff_at_provider_expiry_fails_without_starting_a_replacement,synthesis_usage_errors_are_exit_two_and_emit_no_json); everything else passes (lib 304, bin 224 with the new test, help_cli 7, session_protocol 43).cargo fmt --check -p berd-callpasses.cargo clippy -p berd-call --all-targets -- -D warningsreports 8 existing errors in other files (newchunks_exact_to_as_chunksand similar lints); none are inhost_session.rs.🤖 Generated with Claude Code