#!/bin/bash # documentation for handisradio.com # Generate computer spoken words of radio jingle contained in 'radio.txt' file and make a wav format from it espeak -f radio.txt -q -a 100 -s 100 -w radio.wav # play the newly created radio jingle mpv radio.wav while : do # generate playlist with all possible found media formats on radio disk find "$PWD" | grep .mp3 > play.pls find "$PWD" | grep .wav >> play.pls find "$PWD" | grep .mp4 >> play.pls find "$PWD" | grep .mkv >> play.pls find "$PWD" | grep .webm >> play.pls find "$PWD" | grep .m4a >> play.pls find "$PWD" | grep .3gp >> play.pls shuf play.pls > ./p.pls # generate playlist with radio jingle every 6 songs awk '{print}; NR%6==0 {print "radio.wav"}' p.pls > ply.pls mpv --no-video --playlist=ply.pls done