Seperate & expose sound effects

pull/45/head
Mason10198 2 years ago
parent 052527a7f3
commit c13235eb74

@ -152,6 +152,5 @@ SWP_143.wav: Tailmessage Enabled
SWP_144.wav: Tailmessage Disabled
SWP_145.wav: CourtesyTone Enabled
SWP_146.wav: CourtesyTone Disabled
SWP_147.wav: Tic Sound Effect
SWP_148.wav: All Clear Message
SWP_149.wav: Updated Weather Information Message
SWP_147.wav: All Clear Message
SWP_148.wav: Updated Weather Information Message

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -112,6 +112,11 @@ enable_idchange = idchange_config.get("Enable", False)
# Data file path
data_file = os.path.join(tmp_dir, "data.json")
# Tones directory
tone_dir = config["CourtesyTones"].get(
"ToneDir", os.path.join(sounds_path, "TONES")
)
# Define possible alert strings
WS = [
"911 Telephone Outage Emergency",
@ -550,11 +555,18 @@ def sayAlert(alerts):
alert_file = "{}/alert.wav".format(tmp_dir)
combined_sound = AudioSegment.from_wav(
os.path.join(sounds_path, "ALERTS", "SWP_149.wav")
)
word_space = AudioSegment.silent(duration=600)
sound_effect = AudioSegment.from_wav(
os.path.join(sounds_path, "ALERTS", "SWP_147.wav")
os.path.join(sounds_path, "ALERTS", config.get("Alerting", {}).get("AlertSeperator", "Woodblock.wav"))
)
intro_effect = AudioSegment.from_wav(
os.path.join(sounds_path, "ALERTS", config.get("Alerting", {}).get("AlertSound", "StartrekWhistle.wav"))
)
combined_sound = intro_effect + word_space + AudioSegment.from_wav(
os.path.join(sounds_path, "ALERTS", "SWP_148.wav")
)
alert_count = 0
@ -636,7 +648,7 @@ def sayAllClear():
state["last_sayalert"] = []
save_state(state)
alert_clear = os.path.join(sounds_path, "ALERTS", "SWP_148.wav")
alert_clear = os.path.join(sounds_path, "ALERTS", "SWP_147.wav")
if audio_delay > 0:
logger.debug("sayAllClear: Prepending audio with %sms of silence", audio_delay)
@ -644,7 +656,7 @@ def sayAllClear():
silence = AudioSegment.silent(duration=audio_delay)
combined_sound = silence + alert_clear_sound
converted_combined_sound = convertAudio(combined_sound)
alert_clear = os.path.join(tmp_dir, "SWP_148.wav")
alert_clear = os.path.join(tmp_dir, "SWP_147.wav")
converted_combined_sound.export(alert_clear, format="wav")
node_numbers = config.get("Asterisk", {}).get("Nodes", [])
@ -677,7 +689,7 @@ def buildTailmessage(alerts):
combined_sound = AudioSegment.empty()
sound_effect = AudioSegment.from_wav(
os.path.join(sounds_path, "ALERTS", "SWP_147.wav")
os.path.join(sounds_path, "ALERTS", config.get("Alerting", {}).get("AlertSeperator", "Woodblock.wav"))
)
for alert in alert_names:
@ -743,9 +755,6 @@ def changeCT(ct):
"""
state = load_state()
current_ct = state["ct"]
tone_dir = config["CourtesyTones"].get(
"ToneDir", os.path.join(sounds_path, "TONES")
)
ct1 = config["CourtesyTones"]["Tones"]["CT1"]
ct2 = config["CourtesyTones"]["Tones"]["CT2"]
wx_ct = config["CourtesyTones"]["Tones"]["WXCT"]

@ -43,12 +43,21 @@ Alerting:
# Enable instant voice announcement when new weather alerts are issued.
SayAlert: true
# Specify the WAV file in the SOUNDS/ALERTS directory to use as the alert sound effect
AlertSound: StartrekWhistle.wav
# Specify a WAV file in the root of the SOUNDS directory to be appended to the end of the alert message.
SayAlertSuffix:
# Enable instant voice announcement when weather alerts are cleared.
SayAllClear: true
# Specify the WAV file in the SOUNDS/ALERTS directory to use as the all clear sound effect.
AllClearSound: Triangles.wav
# Specify the WAV file in the SOUNDS/ALERTS directory to use as the alert seperator sound effect
AlertSeperator: Woodblock.wav
# Limit the maximum number of alerts to process in case of multiple alerts.
# SkywarnPlus fetches all alerts, orders them by severity, and processes only the 'n' most severe alerts, where 'n' is the MaxAlerts value.
MaxAlerts: 99

Loading…
Cancel
Save

Powered by TurnKey Linux.