Audio passthrough in GitHub Codespaces #191437
Replies: 4 comments
-
|
In Codespaces you can’t play audio directly on your computer because it runs in the cloud. But you can play it in the browser or generate the file and download it. |
Beta Was this translation helpful? Give feedback.
-
|
There's no out-of-the-box audio passthrough in standard Codespaces, but there are a few approaches depending on what you're trying to do: Option 1: Port forwarding + browser (easiest). Option 2: PulseAudio in devcontainer. {
"features": {
"ghcr.io/devcontainers/features/audio:1": {}
}
}Then configure it to stream via a web audio server on a forwarded port. This is more complex but gives real audio output you can hear in a browser tab pointed at the stream. Option 3: Generate + download. VNC audio: The noVNC implementations for Codespaces currently don't include audio passthrough. If this is a critical use case, it's worth filing a feature request at https://github.com/github/codespaces-features. |
Beta Was this translation helpful? Give feedback.
-
|
The short answer is no, there is no official, built-in "one-click" way to pass audio from a GitHub Codespace to your local machine. GitHub Codespaces is designed primarily as a terminal and VS Code-centric environment rather than a full remote desktop with a multimedia stack. However, there are workarounds depending on your specific use case If you are building a web application (e.g., using React or Node.js) that plays audio, you don't need VNC. How it works: When you run your local development server (like npm start on port 3000), Codespaces automatically forwards that port. The Result: You open the forwarded URL in your local browser. Since the browser is running the JavaScript locally on your machine, it will play the audio through your speakers normally. |
Beta Was this translation helpful? Give feedback.
-
|
No, GitHub Codespaces doesn’t support audio playback to your computer by default. Codespaces runs in the cloud, and the built-in VNC or browser interface mainly handles visuals, not sound. So even if audio is playing inside the environment, you won’t hear it on your local machine. That said, here are some practical workarounds:
So in simple terms: If your project is a web app, you’re in luck—just run it in the browser and audio will work normally. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
Body
Is there any way to play audio in GitHub Codespaces and pass it through so I can hear it on my computer? From what I have seen the current VNC options for Codespaces don't support this by default.
Beta Was this translation helpful? Give feedback.
All reactions