
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
A Python library to generate EAS SAME Audio using Raw Data - Remastered
EASGen is a powerful Python library for translating EAS (Emergency Alert System) ZCZC strings or other data into SAME (Specific Area Messaging) headers. It includes robust support for individual headers, attention tones, EOM generation, emulation modes, and WEA tone generation, ensuring a seamless experience for encoding emergency messages.
sudo apt update
sudo apt install python3 python3-pip
python3 -m pip install EASGen-Remastered
python -m pip install EASGen-Remastered
from EASGen import EASGen
from pydub.playback import play
header = "ZCZC-EAS-RWT-005007+0015-0010000-EAR/FOLF-" ## EAS Header to send
Alert = EASGen.genEAS(header=header, attentionTone=False, endOfMessage=True) ## Generate an EAS SAME message with no ATTN signal, and with EOMs.
play(Alert) ## Play the EAS Message
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
header = "ZCZC-CIV-DMO-033000+0100-0010000-EAR/FOLF-" ## EAS Header to send
audio = AudioSegment.from_wav("NewHampshireDMO.wav") ## Alert Audio import
Alert = EASGen.genEAS(header=header, attentionTone=True, audio=audio, endOfMessage=True) ## Generate an EAS SAME message with an ATTN signal, the imported WAV file as the audio, and with EOMs.
play(Alert) ## Play the EAS Message
## The New Hampshire State Police has activated the New Hampshire Emergency Alert System in order to conduct a practice demo. This concludes this test of the New Hampshire Emergency Alert System.
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
header = "ZCZC-EAS-DMO-055079+0100-0010000-EAR/FOLF-" ## EAS Header to send
Alert = EASGen.genEAS(header=header, attentionTone=True, endOfMessage=True, sampleRate=48000) ## Generate an EAS SAME message with an ATTN signal, the imported WAV file as the audio, with EOMs, at a samplerate of 48KHz.
play(Alert) ## Play the EAS Message
from EASGen import EASGen
from pydub import AudioSegment
header = "ZCZC-EAS-RWT-055079+0100-0010000-EAR/FOLF-" ## EAS Header to send
Alert = EASGen.genEAS(header=header, attentionTone=True, endOfMessage=True, sampleRate=48000) ## Generate an EAS SAME message with an ATTN signal, the imported WAV file as the audio, and with EOMs.
EASGen.export_wav("Alert.wav", Alert)
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
header = "ZCZC-EAS-DMO-055079+0100-0010000-EAR/FOLF-" ## EAS Header to send
Alert = EASGen.genEAS(header=header, attentionTone=True, endOfMessage=True) ## Generate an EAS SAME message with an ATTN signal, the imported WAV file as the audio, and with EOMs.
Alert = Alert.set_frame_rate(8000) ## Resample the alert to 8KHz for no reason lol.
play(Alert) ## Play the EAS Message
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
header = "ZCZC-CIV-DMO-033000+0100-0010000-EAR/FOLF-" ## EAS Header to send
audio = AudioSegment.from_wav("NewHampshireDMO.wav") ## Alert Audio import
Alert = EASGen.genEAS(header=header, attentionTone=True, audio=audio, mode="DIGITAL", endOfMessage=True) ## Generate an EAS SAME message with an ATTN signal, the imported WAV file as the audio, with EOMs, and with a SAGE DIGITAL ENDEC style.
play(Alert) ## Play the EAS Message
## The New Hampshire State Police has activated the New Hampshire Emergency Alert System in order to conduct a practice demo. This concludes this test of the New Hampshire Emergency Alert System.
- None
- TFT (Resample to 8KHZ using ".set_frame_rate(8000)" on the generated alert)
- EASyCAP (Basically the same as None)
- DASDEC (Crank up the Samplerate to 48000 for this one)
- SAGE EAS ENDEC (Mode = "SAGE")
- SAGE DIGITAL ENDEC (Mode = "DIGITAL")
- Trilithic EASyPLUS/CAST/IPTV (Mode = "TRILITHIC")
- NWS (Mode = "NWS", Resample to 11KHZ using ".set_frame_rate(11025)" on the generated alert)
- HollyAnne Units (Can't sample down to 5KHz... This is a good thing.)
- Gorman-Reidlich Units (Don't listen to them enough to simulate. I think they're like TFT, but donno.)
- Cadco Twister Units (No Data)
- MTS Units (No Data)
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
print("Normal / EASyCAP")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "", 24000, False))
print("DAS")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "", 48000, True))
print("TFT")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "", 24000, True).set_frame_rate(8000))
print("NWS")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "NWS", 24000, True).set_frame_rate(11025))
print("SAGE")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "SAGE", 24000, True))
print("DIGITAL")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "DIGITAL", 24000, True))
print("EASyPLUS/CAST/IPTV")
play(EASGen.genEAS("ZCZC-EAS-DMO-055079+0100-0391810-EAR/FOLF-", True, True, AudioSegment.empty(), "TRILITHIC", 24000, True))
https://github.com/user-attachments/assets/e56a3f58-20d0-4594-a6bd-e0cdece92540
https://github.com/user-attachments/assets/6ba4db6e-cd2f-4a15-a3d4-9f579abfbfbc
https://github.com/user-attachments/assets/9b4e4131-fbbb-4630-81bf-bba480483d77
https://github.com/user-attachments/assets/58a57f4b-5eac-442b-bcac-8de6c9e759e2
https://github.com/user-attachments/assets/9e987f1a-5c9b-4e48-94e6-6254df09af6a
https://github.com/user-attachments/assets/ca9918ec-78ea-4612-99ee-923bfe695bc0
https://github.com/user-attachments/assets/0e80b6e9-a53b-4d88-94e9-4d44f6f3019f
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
Alert = EASGen.genATTN(mode="NPAS") ## Generate an NPAS (AlertReady) Tone
play(Alert) ## Play the NPAS Tones
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
Alert = EASGen.genATTN(mode="WEA") ## Generate WEA Tones
play(Alert) ## Play the WEA Tones
from EASGen import EASGen
from pydub.playback import play
from pydub import AudioSegment
header = "ZCZC-CIV-DMO-033000+0100-0010000-EAR/FOLF-" ## EAS Header to send
Alert = EASGen.genEAS(header=header, attentionTone=True, mode="DIGITAL", endOfMessage=True, bandpass=True) # New BandPass feature, which improves the audio quality on some emulation modes.
play(Alert) ## Play the EAS Message
MIT License
Powered by SecludedHusky Systems. Get affordable internet radio services and VPS hosting today.
FAQs
A Python library to generate EAS SAME Audio using Raw Data - Remastered
We found that EASGen-Remastered demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.