[GH-ISSUE #147] microphone? #96

Closed
opened 2026-10-15 12:56:15 +00:00 by bsakaguchi · 14 comments
Owner

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.

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.
bsakaguchi 2026-10-15 12:56:15 +00:00
Author
Owner

@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?

<!-- gh-comment-id:2479855673 --> @ABeltramo commented on GitHub (Nov 15, 2024): This is probably one of the top 5 highest requested features missing from Moonlight, see: [here](https://ideas.moonlight-stream.org/posts/51/mic-passthrough) 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?
Author
Owner

@adamwolf commented on GitHub (Nov 15, 2024):

Whoops!

Right now, a Pi 5.

<!-- gh-comment-id:2479872790 --> @adamwolf commented on GitHub (Nov 15, 2024): Whoops! Right now, a Pi 5.
Author
Owner

@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_DIR in 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!

<!-- gh-comment-id:2479902208 --> @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_DIR` in 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!
Author
Owner

@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:

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_DIR in 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!

—
Reply to this email directly, view it on GitHub
https://github.com/games-on-whales/wolf/issues/147#issuecomment-2479902208,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAIWYNAA2OGQPIN3FRC3IT2AZM6DAVCNFSM6AAAAABR33S77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZHEYDEMRQHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2479912982 --> @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: > 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_DIR in 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! > > — > Reply to this email directly, view it on GitHub > <https://github.com/games-on-whales/wolf/issues/147#issuecomment-2479902208>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAAIWYNAA2OGQPIN3FRC3IT2AZM6DAVCNFSM6AAAAABR33S77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZHEYDEMRQHA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@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?

<!-- gh-comment-id:2479918150 --> @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?
Author
Owner

@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.

<!-- gh-comment-id:2479991208 --> @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.
Author
Owner

@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

<!-- gh-comment-id:2479996638 --> @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
Author
Owner

@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.

<!-- gh-comment-id:2571526927 --> @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.
Author
Owner

@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?

<!-- gh-comment-id:2600960272 --> @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?
Author
Owner

@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!!

Is there a good place to either modify the Pulse config, or run something like that automatically?

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.toml under the Steam app section.

<!-- gh-comment-id:2600963736 --> @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!! > Is there a good place to either modify the Pulse config, or run something like that automatically? 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.toml` under the Steam app section.
Author
Owner

@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.0 on the machine with the mic, and then pactl load-module module-tunnel-source server=tcp:kidspi inside a terminal in moonlight in the steam entry. I was able to use pactl list short to 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!

<!-- gh-comment-id:2600970038 --> @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.0` on the machine with the mic, and then `pactl load-module module-tunnel-source server=tcp:kidspi` inside a terminal in moonlight in the steam entry. I was able to use `pactl list short` to 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!
Author
Owner

@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!

<!-- gh-comment-id:2601001648 --> @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!
Author
Owner

@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:

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!

—
Reply to this email directly, view it on GitHub
https://github.com/games-on-whales/wolf/issues/147#issuecomment-2601001648,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAIWYPKBIDBKISR4Z2VPOT2LQAC3AVCNFSM6AAAAABR33S77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBRGAYDCNRUHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:2601022883 --> @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: > 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! > > — > Reply to this email directly, view it on GitHub > <https://github.com/games-on-whales/wolf/issues/147#issuecomment-2601001648>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAAIWYPKBIDBKISR4Z2VPOT2LQAC3AVCNFSM6AAAAABR33S77OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBRGAYDCNRUHA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@yitzhakbg commented on GitHub (Jan 20, 2025):

Thanks for the fine work. Mic. is going to be very important for Anki under Wolf

<!-- gh-comment-id:2602572682 --> @yitzhakbg commented on GitHub (Jan 20, 2025): Thanks for the fine work. Mic. is going to be very important for Anki under Wolf
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#96
No description provided.