This commit is contained in:
46
op25.liq
46
op25.liq
@@ -11,20 +11,20 @@ set("log.level", 1)
|
||||
# Make the native sample rate compatible with op25
|
||||
set("frame.audio.samplerate", 8000)
|
||||
|
||||
# ==========================================================
|
||||
# 📢 ICECAST CONFIGURATION USING ENVIRONMENT VARIABLES
|
||||
# Use get_env("VAR_NAME", "default_value")
|
||||
# ==========================================================
|
||||
ICE_HOST = get_env("ICE_HOST", "ic2.vpn.cusano.net")
|
||||
ICE_PORT = int_of_string(get_env("ICE_PORT", "8000"))
|
||||
ICE_MOUNT = get_env("ICE_MOUNT", "mountpoint")
|
||||
ICE_PASSWORD = get_env("ICE_PASSWORD", "hackme")
|
||||
ICE_DESCRIPTION = get_env("ICE_DESCRIPTION", "op25")
|
||||
ICE_GENRE = get_env("ICE_GENRE", "Public Safety")
|
||||
# ==========================================================
|
||||
|
||||
input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2.5 -s"))
|
||||
# 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)
|
||||
|
||||
# Compression
|
||||
input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)
|
||||
@@ -32,10 +32,18 @@ input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, rele
|
||||
# Normalization
|
||||
input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)
|
||||
|
||||
|
||||
# ICECAST STREAMING
|
||||
# Uncomment to enable output to an icecast server
|
||||
# Change the "host", "password", and "mount" strings appropriately first!
|
||||
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
|
||||
#
|
||||
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, host="ic2.vpn.cusano.net", port=8000, mount="mountpoint", password="hackme", mean(input))
|
||||
# ==========================================================
|
||||
# OUTPUT: Referencing the new variables
|
||||
# ==========================================================
|
||||
output.icecast(
|
||||
%mp3(bitrate=16, samplerate=22050, stereo=false),
|
||||
description=ICE_DESCRIPTION,
|
||||
genre=ICE_GENRE,
|
||||
url="",
|
||||
fallible=false,
|
||||
host=ICE_HOST,
|
||||
port=ICE_PORT,
|
||||
mount=ICE_MOUNT,
|
||||
password=ICE_PASSWORD,
|
||||
mean(input)
|
||||
)
|
||||
Reference in New Issue
Block a user