random/mumble-bot
2020-04-16 21:06:01 +02:00
..
bot.py add auto stream stop and fixes 2020-04-16 21:06:01 +02:00
README.md update docs 2020-04-15 21:32:20 +02:00

mumble-bot

prende l'audio del canale, ne fa stdout.

Install

git clone  https://github.com/azlux/pymumble # quest non sta su pypy
cd pymumble
pip3 install --user -r requirements.txt
python3 setup.py install --user

Usi

Ascolta

con pulseaudio

python3 bot.py --stream --channel "canale" | paplay --raw --rate=48000 --format=s16le --channels=2

Stream to icecast

python3 bot.py --stream --channel "canale" | ffmpeg -ac 2 -ar 48000 -f s16le -i pipe: -codec:a libvorbis -qscale:a 3 -content_type 'audio/ogg' -vn -f ogg icecast://username:passwordsicura@ice.cast:8000/test.ogg

Use inside liquidsoap

(
id: "antani",
buffer: 2.0,
channels: 2,
max: 10,
restart: true,
restart_on_error: true,
samplerate: 48000,
"python3 /path/to/bot.py --channel canale"
)

Poi entri in chat e fai il comando /start per iniziare la diretta, /stop per fermarla.