An open API service indexing awesome lists of open source software.

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

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