===== servers:vertov:audio ===== ==== Scheda audio ==== cat /proc/asound/cards 0 [Intel ]: HDA-Intel - HDA Intel HDA Intel at 0xfce10000 irq 44 ==== PAM ==== edit /etc/security/limits.d/audio.conf @audio - rtprio 95 @audio - memlock unlimited ==== User audio ==== Un utente non-amministrativo che appartiene al gruppo audio adduser vbe groupadd audio usermod -a -G audio vbe ==== Alsa ==== apt install alsa-utils libasound2 libasound2-plugins aplay -l List of PLAYBACK Hardware Devices card 0: Intel [HDA Intel], device 0: Generic Analog [Generic Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 ==== Jack ==== apt install jackd2 alsaplayer-jack jack_capture jackd --version echo "/usr/bin/jackd -dalsa -r48000 -p1024 -n2 -D -Phw:Intel" > .jackdrc -d usa alsa\\ -r frequenza/rate, usiamo 48000\\ -p frames/period - proviamo 1024 (tanto buffer meno drops) se no scendiamo a 512 o 256\\ -n periods/buffers (due dovrebbe essere ok, se no 3)\\ -D duplex\\ -P in (la scheda audio in)\\ -C la scheda capture vbe@vertov:~$ jack_control status/start/stop ==== Icecast ==== Al momento icecast gira su Zaphoda i settaggi di collegamento al mountpoint bitume su icecast2: user: bitume password: nonteladico mountpoint: bitume.mp3 hostname: abbiamoundominio.org port: 8000 ==== Puredata ==== apt -t buster-backports install puredata pd-unauthorized puredata connette ad icecast, ma solo usando source [[http://write.flossmanuals.net/pure-data/audio-streaming/|1]], [[https://waterpigs.co.uk/articles/how-to-stream-live-audio-over-the-web-using-icecast2-and-puredata/|2]] ==== Mumble-client-sink-bot ==== Mumble-server (murmur) gira su Zaphoda. Abbiamo bisogno un mumble-client per avere un sink audio in ascolto. Mumble-client apt install mumble copia da una conf locale in vbe@vertov:~/.config/Mumble/Mumble.conf oppure usare ssh -X vbe@vertov:~$ mumble -m mumble://bitume@parla.abbiamoundominio.org -n vbe@vertov:~$ xvfb-run mumble -m mumble://bitume@parla.abbiamoundominio.org -n Barnard Mumble-client cline Suggerito anche da [[https://git.younerd.org/bisco/strummolo/src/branch/master/deploy.sh|Strummolo]], ma Barnard [[https://github.com/layeh/barnard|non è aggiornato]] ==== Mumble-client-music-bot ==== [[https://github.com/azlux/botamusique|botamusique]] apt install opus-tools python3 ffmpeg uso: mettere gli mp3 in vbe@vertov:~/botamusique/musica/ rm vbe@vertov:~/botamusique/musica.db (così che non ricordi vecchie canzoni cancellate) screen vbe@vertov:~$ firejail --noprofile venv/bin/python mumbleBot.py --config configuration.ini #nodownload /ls (list song) /sl 1 (play song 1 se era muto o mette in coda) /v 60 (volume a 60%, che è il default) /stop //nota: il file configuration.ini contiene tokens// ==== Azuracast ==== azuracast via docker include icecast, liquidsoap, sftp, web upload e webdj [[https://docs.azuracast.com/en/getting-started/installation/docker|installazione]] apt install curl git apt-transport-https mkdir -p /srv/azuracast cd /srv/azuracast curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh > docker.sh chmod a+x docker.sh ./docker.sh install Non installa docker and docker-compose\\ stable e non rolling\\ porte: 80, 443, 2022 per sftp\\ letsencrypt on radio.abbiamoundominio.org (esiste il CNAME) Finire configurazione via web ssh vertov.unit -NL 8080:172.17.0.1:80 http://localhost:8080 http://radio.abbiamoundominio.org il docker-compose.override.yml version: '2.2' services: web: volumes: - /srv/azuracast/stations:/var/azuracast/stations stations: volumes: - /srv/azuracast/stations:/var/azuracast/stations - /srv/azuracast/media/aaa.mp3:/usr/local/share/icecast/web/error.mp3 ==== altri software utili AV === apt install darkice lame vorbis-tools festival ==== Pymuble ==== Tentativo di sviluppare un client python per mumble che faccia stream su icecast usando libreria pymumble; in fase di test su vm Frankie e' stato creato un container docker chiamato mumble, file di sviluppo nella home di utente unit. Il settaggio base ha richiesto l'installazione dei seguenti pacchetti su container base python:latest apt-get install libopus0 pip3 install pymumble // API MUMBLE apt-get install portaudio19-dev pip3 install pyaudio // BINDINGS FOR PORTAUDIO apt-get install python3-dev libshout3-dev pip3 install python-shout // ICECASThttps://github.com/azlux/pymumble Siti di riferimento: [[https://github.com/azlux/pymumble|pymumble]] [[https://github.com/azlux/pymumble/blob/pymumble_py3/API.md|pymumble_api]] [[https://github.com/azlux/botamusique|bot_music]] {{tag>[icecast mumble puredata jack bitume]}}