Skip to content

fix(audio): reap owned server on client shutdown - #7

Closed
Origamii520 wants to merge 37 commits into
syswonder:mainfrom
Origamii520:agent/persistent-audio-server-lifecycle
Closed

fix(audio): reap owned server on client shutdown#7
Origamii520 wants to merge 37 commits into
syswonder:mainfrom
Origamii520:agent/persistent-audio-server-lifecycle

Conversation

@Origamii520

Copy link
Copy Markdown
Contributor

Summary

  • always stop and reap the client-owned audio device server during application shutdown
  • close the owned log handle and wait after both terminate and kill
  • preserve externally managed audio servers
  • run local audio cleanup even when reverse-bridge shutdown fails

Validation

  • isolated unit tests with external runtime imports stubbed (9 passed)
  • python3 -m py_compile for the two implementation files and two test files
  • git diff --check origin/main

A full dependency-installed Client test environment was not created for this draft; no dependencies were installed or changed on the host.

enkerewpo and others added 30 commits July 4, 2026 00:01
…o-ui-20260707-170529

feat: add Robonix client demo WebUI
- Added .DS_Store, .vscode/, .venv/, and .cursor/ to .gitignore.
- Renamed script from `robonix-audio-bridge` to `robonix-client-audio-bridge` in pyproject.toml and updated README accordingly.
- Updated README for clarity on the client-server architecture and connection setup.
- Adjusted audio bridge documentation to reflect changes in endpoint configuration.
- Enhanced client-side JavaScript and HTML for improved user experience and settings management.
- Refactored CSS for better layout and responsiveness in the WebUI.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add persistent client settings for robot host, Atlas port, session identity, audio primitive selection, and per-primitive device selection. Add Audio and Settings views, F2 voice capture, a hands-free control, and Liaison status rendering.

Audio I/O is selected by primitive and device for each direction. The client starts its local audio server but only creates a reverse relay after Atlas identifies a selected audio provider as a reverse bridge. The robot endpoint is obtained from the provider bridge_info capability; no client IP address or assumed robot-side port is stored in the client configuration.

The chat transport exposes the Liaison hands-free contracts and keeps task/audio state local to the client browser.

Verified:
python3 -m compileall -q src/robonix_client
node --check src/robonix_client/static/app.js
git diff --check
Python fixture: reverse endpoint validation
Python fixture: Atlas bridge discovery transport.
When hands-free is enabled, inspect the currently selected input/output providers through Atlas. If either declares the reverse bridge capability, establish the client-owned WebSocket before enabling Liaison. This keeps USB audio routes unchanged and avoids recording loops after a client restart.

Also rewrite a loopback WebSocket advertisement using the user-supplied Atlas host, matching the existing gRPC endpoint behavior. Verified with compileall, Node syntax, a provider-selection fixture, and a live Atlas/Liaison reverse connection on the Ranger deployment.
Split the Audio page into independently scrollable configuration and log columns. Configuration cards now retain their natural height; only the containing column scrolls when needed, while the log content keeps its own scroll region.
- Added support for persisting client settings, including robot host and audio device configurations.
- Implemented new API endpoints for loading and saving settings.
- Introduced microphone testing functionality to verify audio input.
- Updated the client UI to reflect changes in settings and added visual feedback for audio tests.
- Enhanced the audio device management section with improved diagnostics and status reporting.

This update improves user experience by ensuring settings persist across sessions and providing tools for testing audio devices effectively.
enkerewpo and others added 7 commits July 15, 2026 14:13
Add Windows to SUPPORTED_AUDIO_PLATFORMS so the local audio device
server can start on Windows. sounddevice ships its own PortAudio DLL
on Windows, so no system library is required.

- Add "Windows" to SUPPORTED_AUDIO_PLATFORMS set
- Add PortAudio/WASAPI backend label for Windows
- Add Windows install hint (no system PortAudio install needed)
- Replace Windows-rejection test with Windows-support test
- Update unsupported-platform test to use FreeBSD as the example

Co-Authored-By: Xiangrui Cheng <ccc_7020@qq.com>
Assisted-by: Claude Code:deepseek-v4-pro
Document that Windows is now supported. The sounddevice extra ships
its own PortAudio DLL by default. If device enumeration still fails,
users can install a pre-built PyAudio wheel from elibroftw/pyaudio_portaudio
which provides a system-wide PortAudio that sounddevice can use.

Co-Authored-By: Xiangrui Cheng <ccc_7020@qq.com>
Assisted-by: Claude Code:deepseek-v4-pro
…pport

feat: support Windows local audio via PortAudio/WASAPI
Always stop and reap the client-owned audio device server, close its log handle, preserve external servers, and run cleanup even when the reverse bridge stop path fails.

Assisted-by: Codex:gpt-5.6-sol [TOOL Codex]
@enkerewpo

Copy link
Copy Markdown
Member

Maintainer note: main history was rewritten to enforce the repository human-authorship policy and add CI. Please rebase this branch onto the current main before further review. This does not change the feature decision or review scope.

@Origamii520

Copy link
Copy Markdown
Contributor Author

已按维护者要求基于重写后的当前 main 建立替代 PR #10,仅重放原功能提交并完成测试与身份检查。后续审核请转至 #10

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.

4 participants