Blokovani pres konstantu
[mirrors/Programs.git] / bash / parrot.sh
CommitLineData
c4c7dacb
TM
1#!/bin/bash
2#This is simple audio echoing script
3#usefull as virtual parrot or simple HAM repeater controller
4
5file='/tmp/out.wav'
6silence_treshold='8%'
7silence_timeout='3'
8message_timeout='60'
9message_delay='1'
10message_intro='repeat'
11normalize_db='-1'
12
13while :; do
14 echo -e "====> RECORDING\t$file, treshold $silence_treshold, timeout $silence_timeout"
15 rec -c 1 -r 22050 "$file" \
16 silence 1 0 $silence_treshold 1 00:00:$silence_timeout $silence_treshold \
17 trim 0 $message_timeout
18 echo -e "====> DELAY\t$message_delay seconds"
19 sleep $message_delay
20 [ -n "$message_intro" ] && {
21 echo -e "====> TTS\t$message_intro"
22 which espeak && espeak -- "$message_intro"
23 }
24 echo -e "====> PLAYING\t$file, normalizing to $normalize_db dB"
25 play --norm=$normalize_db "$file"
26done
27
28
This page took 0.11281 seconds and 4 git commands to generate.