Automatic broadcast message output

If you want to (semi-)automatically output a broadcast that is available as an audio file, you can use the following instructions. Here a so-called Alsa loopback device is used which is supplied with an audio stream (e.g. from aplay or vlc) via SvxLink. The stream is then compared to the audio stream from its own receiver-voted.Preconditions:- relatively modern Linux (preferably not developed before the Cretaceous period)- relatively new SvxLink version

1) Create a file /etc/asound.conf as root with the following content: pcm_slave.hw_loopback {
pcm „hw:Loopback,1,2“
channels 2
RAW format
rate 16000
}

pcm.plug_loopback {
type plug
slave hw_loopback
ttable {
0.0 = 1
0.1 = 1
}
}

2) load the module snd-aloop (as root):modprobe snd-aloopWith „aplay -l“ you get an overview of the available Alsa-Devices, that looks different with you of course:**** list of hardware devices (PLAYBACK) ****
Card 0: PCH [HDA Intel PCH], Device 0: ALC892 Analog [ALC892 Analog]
Sub-devices: 0/1
Sub-device #0: subdevice #0
Board 0: PCH [HDA Intel PCH], Device 1: ALC892 Digital [ALC892 Digital]
Sub-devices: 1/1
Sub-device #0: subdevice #0

Card 1:


Card 2: Loopback [Loopback], Device 0: Loopback PCM [Loopback PCM], Card 2: Loopback [Loopback], Device 0: Loopback PCM [Loopback PCM], Card 2: …
Sub-devices: 7/8
Sub-device #0: subdevice #0
Sub-device #1: subdevice #1
Sub-device #2: subdevice #2
Sub-device #3: subdevice #3
Sub-Device #4: subdevice #4
Sub-Device #5: subdevice #5
Sub-Device #6: subdevice #6
Sub-device #7: subdevice #7
Card 2: Loopback [Loopback], Device 1: Loopback PCM [Loopback PCM]
Sub-devices: 8/8
Sub-device #0: subdevice #0
Sub-device #1: subdevice #1
Sub-device #2: subdevice #2
Sub-device #3: subdevice #3
Sub-Device #4: subdevice #4
Sub-Device #5: subdevice #5
Sub-Device #6: subdevice #6
Sub-device #7: subdevice #7The (virtual) card 2 is the device which is available as loopback device and accesses the SvxLink.3) Add a receiver section and a voter to /etc/svxlink/svxlink.conf: [RepeaterLogic].
RX=Voter

# in the Voter area the previously used Rx (usually „Rx1“) must be
# as well as the new Rx, which is supported by the Alsa loopback device
# is generated, this is RxLoop!
[Voter]
TYPE=Voter
RECEIVERS=RxLoop,Rx1
VOTING_DELAY=200
BUFFER_LENGTH=0

# The „RX“ as Alsa-Loopbackdevice
[RxLoop]
TYPE=Local
AUDIO_DEV=alsa:plughw:2
AUDIO_CHANNEL=0
SQL_DET=VOX
SQL_START_DELAY=0
SQL_DELAY=0
# here (SQL_HANGTIME=xxx) pay attention to a high follow-up time, so that
# The RX won’t „drop off“ in the breaks and have a Roger Beep
# Created, 5000ms should do it!
SQL_HANGTIME=5000000
VOX_FILTER_DEPTH=20
VOX_THRESH=1000
DEEMPHASIS=0

# and here the „normal“ HF-Rx used so far
[Rx1]
… leave everything as is4) Output broadcast message:aplay –device=plughw:2,1 broadcast message.wav