https://github.com/hmaier-dev/audio-stream
Stream internal audio from server to a client, using python sockets
https://github.com/hmaier-dev/audio-stream
Last synced: over 1 year ago
JSON representation
Stream internal audio from server to a client, using python sockets
- Host: GitHub
- URL: https://github.com/hmaier-dev/audio-stream
- Owner: hmaier-dev
- Created: 2021-09-01T12:54:58.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-16T17:20:34.000Z (almost 3 years ago)
- Last Synced: 2025-02-01T01:56:50.040Z (over 1 year ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# audio-stream installation
---
### Step 1
- Clone this repository to both of your machines
`git clone https://github.com/hmaier-ipb/audio-stream.git`
### Step 2
- Get the PyAudio-module installed
- you need `pipwin` or the `python-pyaudio`- package, because these contain `portaudio` which is an C-Library that PyAudio uses to record/play audio.
##### Windows
`pip install pipwin`
`pipwin install pyaudio`
##### Linux
`sudo apt install python-pyaudio`
### Step 3
- Enable a loopback audio interface. This is needed to record internal system audio. This loopback-interface is seen as a internals microphone.
##### Pulseaudio on Linux
`pactl load-module module-loopback`
- You should get returned a number, which is the index number of the loopback-interface
- Btw: this is just temporary, for more info visit [USB Audio Device Loopback Through Speakers](https://askubuntu.com/questions/19894/usb-audio-device-loopback-through-speakers) or [How to route pulse audio device into alsa loopback (virtual microphone)?](https://askubuntu.com/questions/895216/how-to-route-pulse-audio-device-into-alsa-loopback-virtual-microphone)
- check `pavucontrol` to see if a new interface has appeared
- move to the input-devices tab and set the loopback-interface as fallback
##### Sound on Windows
- activate your soundcard as default audio-input devices
- here is a good article on how to do it [How to Record the Sound Coming From Your PC](https://www.howtogeek.com/217348/how-to-record-the-sound-coming-from-your-pc-even-without-stereo-mix/)
### Step 4
- work in progress
### Appendix
- by now the latency of this is way to high (5 seconds)
- you have to manually change the IP adresses in the script