Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andy671/audioretranslator
Raw audio sender for cases like streaming computer audio from your laptop to the PC.
https://github.com/andy671/audioretranslator
audio-streaming pyaudio soundflower waveform
Last synced: 20 days ago
JSON representation
Raw audio sender for cases like streaming computer audio from your laptop to the PC.
- Host: GitHub
- URL: https://github.com/andy671/audioretranslator
- Owner: Andy671
- Created: 2019-07-01T07:14:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-28T20:57:15.000Z (about 5 years ago)
- Last Synced: 2023-10-20T09:24:55.168Z (about 1 year ago)
- Topics: audio-streaming, pyaudio, soundflower, waveform
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AudioRetranslator
I've done this to watch films on the laptop while hearing audio from the computer speakers :D
Made with python, sockets & love.
## Requirements
### Mac OS
- Installed [Soundflower](https://github.com/mattingalls/Soundflower/releases) driver on the sender device. For other platforms, it would also work, if you route your computer output to the "emulated input device".
- Installed [PyAudio](https://pypi.org/project/PyAudio/) package on both (sender & receiver) devices.### Usage
1. [receiver.py](receiver.py) works as the server. Launch it on the receiver machine first:
```
python3 receiver.py YOUR_SERVER_IP YOUR_PORT
```
2. [sender.py](sender.py) works as the client that sends audio. Launch it on the sender machine:
```
python3 sender.py YOUR_SERVER_IP YOUR_PORT
```
3. (Optional) You can try set `CHANNELS` to **1** if you want better performance. (Do it in both `sender.py` and `receiver.py`). Also, play with the `BUFFER_SIZE` (`receiver.py`) to see what latency is good for you. I prefer **16384** or **8192**.### Sound Check
If everything is OK -> you should hear the audio from the sender device on the receiver device.## How it works
It simply sends stream of audio bytes with the sockets. The wireless connection is by definition weeker than wired, therefore sometimes you would hear the lags in audio, because the algorithm just skips bytes, if it lost some and buffer started overflowing.Hope you enjoy it) *Have Fun*!