mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[GH-ISSUE #147] microphone? #96
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#96
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adamwolf on GitHub (Nov 15, 2024).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/147
hiya folks! Amazing piece of kit here!
My kid is asking about voice chat in Steam. I'm relatively savvy with linux and docker, but there's a lot of pieces here! :)
Is mic input something I can rig up with a custom gstreamer pipeline?
Thanks! I apologize if this is covered somewhere--I looked in the docs, here, and via Google a bit and didn't find anything.
@ABeltramo commented on GitHub (Nov 15, 2024):
This is probably one of the top 5 highest requested features missing from Moonlight, see: here
With that said, I guess for desktop clients, there are ways around it.. On smart TVs or consoles, it might be more challenging.
Which client are you using?
@adamwolf commented on GitHub (Nov 15, 2024):
Whoops!
Right now, a Pi 5.
@ABeltramo commented on GitHub (Nov 15, 2024):
Nice, everything being Linux would allow you to use PulseAudio to send your microphone audio from the client straight into the PulseAudio server that we run in Wolf.
Or, if you configure a PulseAudio server on the host where Wolf is running and passthru the pulse socket under
XDG_RUNTIME_DIRin the container, Wolf will try to connect to it instead of spinning an additional container with our pre-configured PulseAudio.I know this might all sound too complex, I'd suggest to start messing around with PulseAudio via the network so that your PI microphone gets picked up by your server. Once that is setup, passing it thru to Wolf should be simple enough.
Sounds like a fun weekend project. I might try to set it up myself if I get some free time!
@adamwolf commented on GitHub (Nov 15, 2024):
If I get the server, and then wolf, seeing the microphone, do you think
there'd be any extra configuration to get Steam to see it?
On Fri, Nov 15, 2024, 2:49 PM ABeltramo @.***> wrote:
@ABeltramo commented on GitHub (Nov 15, 2024):
Once it's there in PulseAudio, it should just appear in the Steam settings page as an available microphone.
There would be no isolation between containers so that microphone could be accessed by other Moonlight clients, but that shouldn't be a problem in your case, right?
@adamwolf commented on GitHub (Nov 15, 2024):
If I get to it this weekend, I'll write it up. I haven't rigged up Pulse Audio over the network but it looks pretty straightforward.
@ABeltramo commented on GitHub (Nov 15, 2024):
Good luck and have fun!
If you need any help, feel free to ping me here or directly on our Discord server
@salty2011 commented on GitHub (Jan 5, 2025):
@adamwolf > closing this item as at this stage support for voice is dependant on the client and servers both supporting it. This really sits outside the scope of Wolf at this stage.
However at @ABeltramo mentioned there are work arounds. Another option given you use a PI is to leverage something like discord locally on the PI itself.
@adamwolf commented on GitHub (Jan 19, 2025):
No problem. I don't quite know the etiquette here. Is it rude for me to ask some things here in continuation?
If it isn't:
Wow! I had no idea how deep Linux audio stuff went!
I spent a few hours on this recently and got it to work, in a pretty manual fashion. I tried for a little bit to pass the Pulse socket through, and couldn't get it to work. I couldn't find or figure out how to make good diagnostic output. I was a little stymied by the extra Pulse container, I think. I think the issue getting it work might have been a permissions issue, where the socket was owned outside the container by a different UID than the user inside the container. Does that make sense, or does it make sense that it should work regardless?
I am able to get it to work if I open up the Steam entry via moonlight, open up a terminal next to Steam, and run something like
pactl load-module module-tunnel-source server=tcp:computer-with-mic. Is there a good place to either modify the Pulse config, or run something like that automatically?@ABeltramo commented on GitHub (Jan 19, 2025):
@adamwolf interesting, I'm glad you've got something working; I'd be very interested in some more info!!
You should be able to add a script down in
/etc/cont-init.d/, and that would be run on startup.https://github.com/games-on-whales/gow/blob/master/images%2Fbase%2Foverlay%2Fentrypoint.sh#L10
You don't even have to build the image, just add a mount point in your
config.tomlunder the Steam app section.@adamwolf commented on GitHub (Jan 19, 2025):
Thanks! I'm going to work on getting my current setup automatic, so I don't have to come run commands every time my kids want to play Terraria, and then I want to work on some shortfalls, like authentication. I'll write it up nicely then.
However, if that never comes: the very very very short version is running
pactl load-module module-native-protocol-tcp listen=0.0.0.0on the machine with the mic, and thenpactl load-module module-tunnel-source server=tcp:kidspiinside a terminal in moonlight in the steam entry. I was able to usepactl list shortto get some details.I definitely don't have a deep understanding of the modern Linux audio stack, unfortunately, so from my perspective it seemed like there were subtle differences on what works if you're running Pulse Audio or pipewire-pulse or both pipewire and Pulse Audio (I don't quite know how that last one works at all, actually. It seemed to be how the Pi was set up originally, but I clobbered that setup by accident while figuring things out.)
I'm not sure if pipewire-pulse supports any authentication like with an auth cookie--I wasn't successful when I just tried a few things. I found some messages from a few years ago saying it wasn't yet supported in Pipewire, but that is far from definitive :). I suppose if I stick with this path, if auth won't work, I'll set up an ssh tunnel or something instead. (I get the heebie-jeebies having a microphone on the kid computer being completely open!)
The flexibility of all of this is the only way it works, right, but it also makes this really hard to think about! There's so many ways to do this same thing--like, maybe you could rig up Wolf to use the Pulse Audio server on the mic machine with something like PULSE_SERVER, and skip setting up a container's Pulse Audio server that way.
Anyway, the kids were able to voice chat in Steam. Huzzah! Thanks for your pointers!
@ABeltramo commented on GitHub (Jan 19, 2025):
Yeah, the flexibility and the number of possible ways to do stuff can be overwhelming. Such is life in Linux land 😅
Really interested in a write-up and in testing this out myself. If there's anything that I can add to Wolf to help you out automate this thing, just let me know!
@adamwolf commented on GitHub (Jan 19, 2025):
One thing that's nice about having the container's Pulse Audio wrangle the
mic (like this) is that we should be able to handle multiple clients at the
same time with different mics, I think. (Compared to having the host's
Pulse Audio know about the mic and then sharing that down into the
container by sharing a socket or whatnot)
On Sun, Jan 19, 2025 at 2:01 PM ABeltramo @.***> wrote:
@yitzhakbg commented on GitHub (Jan 20, 2025):
Thanks for the fine work. Mic. is going to be very important for Anki under Wolf