I am using OP25 (boatmod) with LiquidSoap on a Raspberry to decode and listen (locally) to a DMR signal. I have tried different audio processings with LiquidSoap but I am still not satisfied with the output volume, which is too low. It don't think it's a problem of the raspberry / loudspeakers because if I try to play a webradio with mplayer I can hear it well and loud.
This is my current configuration:
I tried with both normalize and normalize + compress.
Note: as you can see I wuold like also to dump the audio as mp3 file, for this reason I removed "mksafe" from the input to avoid recording also the silence between conversation.
Any advice on how to improve volume?
Thank you!
This is my current configuration:
Code:
#!/usr/bin/liquidsoap
# Example liquidsoap streaming from op25 to icecast
# (c) 2019, 2020 gnorbury@bondcar.com, wllmbecks@gmail.com
#
set("log.stdout", true)
set("log.file", false)
set("log.level", 1)
# Make the native sample rate compatible with op25
set("frame.audio.samplerate", 8000)
#input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s"))
input = input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -s -x 4")
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.
# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# High pass filter
input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)
# Low pass filter
input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)
# Normalization
#input = normalize(input, gain_max = 20.0, gain_min = -6.0, target = -13.0, threshold = -60.0)
input = compress(threshold=-18.,ratio=3.,gain=3.,normalize(input))
# LOCAL AUDIO OUTPUT
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
out (input)
#
# PulseAudio
#output.pulseaudio(input)
#
# ALSA
#output.alsa(input)
# dump recordings to a file
time_stamp = '%Y-%m-%d_%H.%M.%S'
output.file(%mp3, "./OUT_#{time_stamp}.mp3", input , fallible=true)
I tried with both normalize and normalize + compress.
Note: as you can see I wuold like also to dump the audio as mp3 file, for this reason I removed "mksafe" from the input to avoid recording also the silence between conversation.
Any advice on how to improve volume?
Thank you!