Skip to content

Adding voice support.#55

Merged
joaopauloschuler merged 12 commits into
v1.23-bpfrom
bpsa
Feb 23, 2026
Merged

Adding voice support.#55
joaopauloschuler merged 12 commits into
v1.23-bpfrom
bpsa

Conversation

@joaopauloschuler

Copy link
Copy Markdown
Owner

No description provided.

joaopauloschuler and others added 10 commits February 21, 2026 05:38
All CompressionConfig fields are now configurable via environment variables:
- BPSA_COMPRESSION_ENABLED (bool, default: 1)
- BPSA_COMPRESSION_KEEP_RECENT_STEPS (int, default: 40)
- BPSA_COMPRESSION_MAX_UNCOMPRESSED_STEPS (int, default: 50)
- BPSA_COMPRESSION_KEEP_COMPRESSED_STEPS (int, default: 80)
- BPSA_COMPRESSION_MAX_COMPRESSED_STEPS (int, default: 120)
- BPSA_COMPRESSION_TOKEN_THRESHOLD (int, default: 0 = disabled)
- BPSA_COMPRESSION_MODEL (str, model id, default: same as main model)
- BPSA_COMPRESSION_MAX_SUMMARY_TOKENS (int, default: 50000)
- BPSA_COMPRESSION_PRESERVE_ERROR_STEPS (bool, default: 0)
- BPSA_COMPRESSION_PRESERVE_FINAL_ANSWER_STEPS (bool, default: 1)
- BPSA_COMPRESSION_MIN_CHARS (int, default: 4096)

Changes:
- bp_utils.py: add get_env_bool_default() helper
- bp_thinkers.py: DEFAULT_THINKER_COMPRESSION reads from env vars
- bp_cli.py: build_model() supports override_model_id; build_agent()
  resolves BPSA_COMPRESSION_MODEL; updated env var documentation
- bp_ad_infinitum.py: updated env var documentation

Generated by claude-sonnet-4.6

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
get_env_bool(name, default=False) now handles both cases:
- When called without default, behaves as before (returns False if unset)
- When called with default, returns that default if unset

Removed redundant get_env_bool_default(). Updated all call sites in
bp_thinkers.py to use get_env_bool() with explicit defaults.

Generated by claude-sonnet-4.6

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
- CLI.md: added 'Context Compression Variables' section with full table
  of all 11 BPSA_COMPRESSION_* vars, their types, defaults and descriptions
- README.md: added a note in the bpsa env vars section pointing to CLI.md
  for compression vars; added a note at the end of the Context Compression
  Configuration Options table pointing to CLI.md for env var configuration

Generated by claude-sonnet-4.6

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
Updated all occurrences of --gui to --gui-x11 in source code and
documentation. The argparse attribute args.gui was also updated to
args.gui_x11 accordingly.

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
When no instruction files (e.g. CLAUDE.md, AGENTS.md) are found in the
current working directory, load_agent_instructions() now falls back to
loading a README file for general project context. Supported formats
(in priority order): .md, .txt, .rst, and no extension. Matching is
case-insensitive. Content is truncated at 20,000 characters and wrapped
in <readme> tags to distinguish it from instruction <filenotes>.

Also add tests/test_bp_load_instructions.py with full coverage of the
new fallback behaviour (priority, truncation, empty file, case
insensitivity, extension preference, etc.).

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
- pyproject.toml: add optional `voice` extra with voicelistener dependency;
  include voice in the `all` extras group
- bp_cli.py: implement /voice [on|off] slash command backed by VoiceListener;
  support WhisperTranscriber via BPSA_VOICE_TRANSCRIBER env var;
  drain voice queue into prompt_toolkit buffer before each render;
  document BPSA_VOICE_TRANSCRIBER and BPSA_VOICE_MODEL env vars;
  clean up voice listener on /exit and EOF

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
Add elevenlabs as a supported voice transcriber alongside whisper,
and document the voice input feature in README.md and CLI.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joaopauloschuler joaopauloschuler self-assigned this Feb 22, 2026
joaopauloschuler and others added 2 commits February 22, 2026 20:04
The voice listener was being stopped/started on every agent run,
creating a new thread each time. This caused threads to accumulate
across turns, especially after each final_answer.

Fix: remove the stop/start around agent.run(). The voice listener
now runs continuously; stale audio captured during agent execution
is already discarded by the existing queue drain in get_input().

Model: claude-sonnet-4.6
Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
Updated by claude-sonnet-4.6

Co-Authored-By: bpsa2 <241537330+bpsa2@users.noreply.github.com>
@joaopauloschuler joaopauloschuler merged commit 61e98fc into v1.23-bp Feb 23, 2026
1 of 4 checks passed
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