let ai hear and talk through the game#149
Merged
Merged
Conversation
Test Coverage
|
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.
Summary
This PR adds game-audio routing support so OpenNeuro can hear in-game voice chat and speak back to players instead of being limited to the local microphone and speaker.
What was added:
AudioIn: same port interface asMic, but with a dynamic input-device dropdownAudioOut: same port interface asSpeaker, but with a dynamic output-device dropdownRemoteAudioIn: same role asAudioIn, but receives audio from a remote WebSocket bridgeRemoteAudioOut: same role asAudioOut, but sends audio to a remote WebSocket bridgesrc.lib.audio.remote_audio_server: FastAPI WebSocket bridge that runs on the game machineWhy
Before this change, OpenNeuro could only:
That meant it could not:
This PR adds the missing local and remote routing pieces.
Local Same-Machine Setup
Use this when OpenNeuro and VRChat run on the same PC.
Recommended graph:
AudioIn -> VAD -> ASR -> LLM -> TTS -> AudioOutOpenNeuro component settings:
MicwithAudioIn.AudioIn.devicetoCABLE-B Output.AudioIn.sample_rateto48000.AudioIn.channelsto2.AudioIn.frame_msto20.SpeakerwithAudioOut.AudioOut.devicetoCABLE-A Input.AudioOut.sample_rateto48000.AudioOut.channelsto1.VRChat / Windows settings:
MicrophonetoCABLE-A Output.CABLE-B Input.Listen to this deviceonCABLE-B Outputand route it to your real headset/speakers.Signal mapping:
AudioOut -> CABLE-A Input -> CABLE-A Output -> VRChat microphoneWindows default output / VRChat output -> CABLE-B Input -> CABLE-B Output -> AudioInRemote Two-Machine Setup
Use this when VRChat runs on one machine and OpenNeuro runs on another.
Game machine
MicrophonetoCABLE-A Output.CABLE-B Input.cd backend uv run python -m src.lib.audio.remote_audio_server