-
Notifications
You must be signed in to change notification settings - Fork 278
JetKVM Advanced, CGO-based 2-way Audio Support #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
db2d107 to
4f47d62
Compare
|
Great news! I'll soon update this PR with Audio Input pass-through functionality too |
c9f4aea to
3444607
Compare
|
Hi @IDisposable Glad you like this functionality, mainly to free up as much of that USB bandwidth. I'm actually looking at this, however, it is a little trickier as it moat likely requires changes in the rv1106-system repo containing the OS too. In case I do manage to pull that off before the v0.5.0 release for which this functionality has been scheduled, I'll update this PR. Thanks, |
|
JetKVM Audio PR Review & Test Feedback Hi @pennycoders , First, thanks for the work on bringing audio and mic support into JetKVM. I’ve tested the new functionality in a local LAN environment with both playback and microphone streaming active, including during real-world scenarios like a Teams call. Test conditions:
Main observations:
Potential Improvements (Technical):
Happy to re-run these tests and provide before/after metrics once adjustments are implemented. |
|
Hi @vvns Thanks! Thank you very much for putting this through its paces! This is great feedback, that I can definitely work with. I initially encountered the interference with the Keyboard & Mouse that you are mentioning and made some optimizations. Do you happen to know the commit hash you've tested at? Is it the latest version of my branch? I am asking because I've tested actual calls with the latest implementation and was definitely usable. I will break down into your feedback and see what I can do about each of the items. If you want we can discuss more in-depth on other channels too. Thanks, Alex |
|
Hi @pennycoders , Glad the feedback is useful! 👍 The version is indeed usable, but in slightly more demanding conditions (e.g., during calls or with sustained mic usage) the remote control latency — which was very low before the audio feature — increases significantly, to the point where slow mouse movement becomes noticeably delayed. I can still retest to be sure nothing was missed, but the latency impact with mic active, packet loss, and Ultra mode distortion were all observed on that commit. I’m happy to continue sharing feedback as you push further updates, so we can iterate quickly toward the best possible audio and control experience. Let me know which channel you’d prefer for more direct discussion, so you can share any details privately if needed. Thanks again for the great work — we’re close to a fully smooth audio + control experience. |
|
Hi @vvns, Are you on the JetKVM Discord? If so, we can discuss there. What's your username? Thanks, |
IDisposable
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really looks nice, all my comments are questions or nits, just feel free to ignore... I wonder if we need to be more explicit in the priority assignment of the other RTC channels (medai/serial/rpc) as we really want to ensure the control signals get through at very high fidelity ... might even be worthwhile splitting up the RPC messages into control vs. advisory messaging, but that's not this PR :)
7408195 to
767311e
Compare
The script was copied but never executed, causing Docker-based builds (via dev_deploy.sh) to fail due to missing ALSA/Opus/SpeexDSP libraries. Reported-by: J-Bu
|
I flashed the image and app with the HDMI fixes and it is working for me. But to be fair I did also not notice any clicks/pops before those changes. |
Thanks! They were happening at low volume, when sound with long silence periods was playing. I've spotted it on an Ubuntu 24.04 laptop. It was one of those things driving me nuts because I couldn't figure it out... until I did. Just for reference, this was the video that made it occur: https://youtu.be/ucZl6vQ_8Uo?si=HpnJRBdnBJFn8OeA |
|
Resolved the merge conflicts... we should probably delete all changes to the language files messages (except the English) and then rerun |
Thanks for fixing the conflicts! I definitely agree on the amount of times translations have changed, but does that command translate automatically? or does it just use english? |
I'll make a run at making sure things are in sync tomorrow. The machine-translate just uses English to fill in any missing messages in the other languages. So if you take the exact version of ZH from current dev (without any of your new strings) and then run |
Merged changes from dev branch including: - Diagnostics logging and download feature (jetkvm#1078) - E2E test infrastructure improvements - UI component updates and refactoring - Japanese keyboard layout support - Various bug fixes and improvements Resolved conflicts in: - jsonrpc.go: Combined audio RPC handlers with diagnostics - SettingsItem.tsx: Kept enhanced badge implementation - WebRTCVideo.tsx: Kept isSecureContext() utility - useJsonRpc.ts: Merged failsafe blocked methods - devices.$id.settings.video.tsx: Kept EDID initialization logic - devices.$id.tsx: Combined audio settings with E2E test handlers
- Fix prettier formatting in SettingsItem, WebRTCVideo, AudioPopover - Replace react-hook-form watch() with useWatch() for React Compiler compatibility - Remove unused dependencies from useCallback - Add eslint-disable for known React ref false positive
|
I would be happy to test this out on my device, if that allows this PR to progress. I am not sure how to obtain a build to put on there though. Do I have to build my own, or is there an "approved builder"? |
|
looking forward to this |
Remove the ability to select between HDMI and USB for audio output. Audio output now always uses the TC358743 HDMI capture device. - Remove AudioOutputSource from config and RPC handlers - Remove audio source UI dropdown and store state - Clean up unused translations across all locales - Update C audio comments to reflect HDMI-only output
Machine translate new audio-related keys to all supported languages: da, de, es, fr, it, nb, sv, zh
|
I just tested this on my device, it works really well! I was able to listen to Spotify and do a Teams Call so both speakers and mic worked Quality was good too |
|
Thanks @pennycoders for taking this to the finish line. Tested this on my device, works well out of the box. However, the microphone audio capture on remote device is "high pitched" than the normal voice (think Chip n Dale voice). Remote machine Config
|
I've tested this on MacOS, Ubuntu 24.04, Windows 10 and Windows 11 as an OS of the remote PC. I must admit I've never tested on a Debian 12 x64. I don't have access to one. Maybe one solution would be to use some sort of input hardware sample detection and dynamic resampling. In any case, I need to reproduce this first. |
|
Another critical observation : If the mic is enabled for a session, and inputs audio is not "used" - all audio packets until they are "used" (either recorded / calls) on remote device are buffered. E.G - Mic enabled at 10:00AM > Recording started at 10:01 AM > Recorded audio has 10:00 to 10:01 audio before actual audio from 10:01. |
That is Very Strange. It looks / feels to me like a USB Host-side issue though. As stated, I did run quite extensive tests on the platforms I've mentioned above. |
- Add discrete note about potential reboot requirement after USB reconfiguration to restore audio input - Clarify USB Audio labels to specify "Audio Input" since it refers to browser microphone -> target computer flow - Update description to explain the feature better
Indeed strange. Tested with a M5 Macbook Pro Host on Sequoia 15.7.3 from a Windows Guest on Chrome (same network) with the same results. Any pointers on what remotely could be causing this? |
|
Would it be possible to add an option to edit the class of the audio USB device and make it look like an actual headset with microphone instead of a virtual device? The problem is that some companies block USB devices and only allow specific vendors such as Jabra & Plantronics for example. |
Shouldn't that be possible from Hardware settings, by updating the USB Identifiers? Haven't paid much attention to that though |
oh it is possible, thanks! |
Please validate on a home windows laptop first though. |
Found a temporary workaround in case if anyone else faces this issue -
|
Summary
This PR introduces bidirectional audio support to JetKVM, enabling both audio output (listening to the managed device) and audio input (microphone from browser to device). Audio is implemented using an in-process CGO architecture that directly calls C code for ALSA audio capture/playback and Opus encoding/decoding. The managed device presents itself as a USB Audio Class 1 (UAC1) gadget providing both stereo speakers and a stereo microphone interface over USB.
Key Features:
Credits
Thanks!
Alex