-
Notifications
You must be signed in to change notification settings - Fork 822
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
How to use audio in bash on windows? #1200
Comments
@therealkenc has a modified version of pulseaudio in a ppa that reconfigures it to run without an unimplemented futex. Then you can pipe pulseaudio over tcp to the Windows version of pulse. |
Would there be any chance of emulating an ALSA device for simple audio in/out? |
User voice for this is here. [BTW to answer @Admin over there, the "developer scenario" is vscode-typewriter (duh).] You could do a Curious: Are you seeing any actual latency, or did you mostly make that up. I was mildly surprised myself when video being streamed over X11 and audio over PA (completely independent software and IP channels) were in sync. |
@therealkenc Well, maybe if Microsoft ever decides to redo the audio device framework on Windows (shudder), they can also add an audio interface via lxdrv. Otherwise I don't much see the point. Audio on Linux is always the biggest nightmare. |
This looks promising though: https://www.linuxmusicians.com/viewtopic.php?t=12818 From what I can gather, you can also redirect Jack2 over tcp/ip, and that can network with the Windows version of Jack, which communicates with ASIO drivers in Windows. |
Yes, all of the higher quality packages like ffmpeg (and by extension everything that uses ffmpeg) support Jack. Funny article referenced in your link, quote: "100mbit/s is a good start". Jesus that's sad. Goes to my comment on latency above. I can remember doing primitive VOIP around 1995 with a 28.8kbps modem and tolerable latency. These days you can probably stream 5.1 channel studio quality audio with 30ms latency and less than 500kbps bandwidth if you do it right. |
@therealkenc I'm not talking about audio sync. That is no the issue. I'm talking about the initial buffer delay from you hit play button in music player software till you can hear it. Also seeking incurs a bit of delay. |
Ahh okay thanks for clarifying. It sure isn't TCP/IP latency; that's 0ms over localhost (rounded to the nearest ms). You're right, something is buffering somewhere. Which isn't surprising, but it is weird because sync does matter. When you play a youtube video on firefox or mp4 video with VLC, your Win32 XcXsrv server doesn't know what you are seeing on screen is supposed to show up at the same time as your Win32 PA server sends audio to the sound card. It gets there when it gets there. Any initial audio buffering would screw up the sync. But, the sync isn't screwed. I haven't actually used PA since I got it to work (because of lack of sensible use cases), but if I get a chance I'll take a look at 0xdeadbeef. |
@saivert Supposedly the tcp loopback from WSL to Windows is actually zero-copy, if I remember correctly. @therealkenc I got jack-dbus installed and configured as a slave following that guide. I did make an strace, dunno if you want to glance at it. I wonder if that's because I pointed it at 127.0.0.1 and/or wasn't running a server on Windows in master mode. Getting jack_control to work was as easy as just doing |
Yeah it's zero copy which helps bandwidth, though it would still be 0ms latency even if it wasn't zero-copy on the bits. Is that with |
I have been testing this on a Windows 10 VM and doing it over RDP so my experiments are invalid. I set it all up locally and no delay on start of playback. Improving RDP sound is next up for MS I guess... |
@therealkenc Yep, with -ff. |
Please use the following bug reporting template to help produce actionable and reproducible issues.
I tried to start espeak on my bash on windows.
I received some errors regarding pulseaudio and the fact that is not installed.
I googled and I found that pulseaudio doesn't work on bash on windows.
There is an other way can I try to use audio on my bash on windows?
I need audio in order to improve tts system such as festvox...
Maybe I must install pulseaudio and start it as a service everytime I start bash?
The text was updated successfully, but these errors were encountered: