aaknitt / zellostream

Python script to stream audio to and from a Zello channel
MIT License
42 stars 11 forks source link

zellostream

Python scripts to stream audio one way to a Zello channel. Designed for Python 3.X

Acquires audio from a sound card or UDP port to send to Zello. (UDP support is designed for use with trunk-recorder and the simplestream plugin).

Create a developer account with Zello to get credentials. Set up a different account than what you normally use for Zello, as trying to use this script with the same account that you're using on your mobile device will cause problems.

For Zello consumer network:

config.json

Dependencies

Windows

Requires these DLL files in the same directory:

These can be obtained from the 'opusfile' download at http://opus-codec.org/downloads/

Requires pyaudio: https://people.csail.mit.edu/hubert/pyaudio/

Required Python packages

pip3 install pycryptodome  
pip3 install pyaudio  
pip3 install pulsectl  
pip3 install websocket-client  
pip3 install numpy --upgrade  
pip3 install opuslib  
pip3 install librosa

Installing librosa on a Raspberry Pi

sudo apt-get install llvm-11  
LLVM_CONFIG=llvm-config-11 pip3 install llvmlite  
LLVM_CONFIG=llvm-config-11 pip3 install librosa  
sudo apt-get install libblas-dev  
sudo apt-get install libatlas-base-dev

Using zellostream.py with trunk-recorder

The simplestream plugin of trunk-recorder can be be used to send audio from trunk-recorder in real time, as it is being recorded. zellostream.py can receive this audio and stream it to Zello with low latency.

zellostream.py sends audio to zello in the order recieved via UDP packets with no mixing or delays. Therefore, only a single talkgroup should be sent to Zello using this method. If audio from more than one talkgroup is sent and both are active at the same time, the audio from the two talkgroups will be interleaved and unintelligible.

A single talkgroup can be streamed in one of two ways: