adding another argument to provide a custom output file

This commit is contained in:
iRaven 2022-11-22 16:11:43 -06:00
parent 9415e8fba2
commit 91ea00fb03

View File

@ -6,10 +6,14 @@ import subprocess # to play the resulting wave file
import datetime # EAS alerts are heavily dependent on timestamps so this makes it easy to send a thing now
import argparse
# NicksMadScience same eas encoder was modified by iRaven @ iravenhome.net (github.com/iraven4522)
# version 0.2? to add a custom outfile path. :D
# parse command-line arguments
parser = argparse.ArgumentParser()
parser.add_argument("--playaudiolive", "-pal", nargs='?', default=-1)
parser.add_argument("--code", "-c", nargs='?', default="none")
parser.add_argument("--outfile","-o", nargs='?', default="same.wav")
args = parser.parse_args()
@ -180,7 +184,7 @@ signal *= 32767
signal = np.int16(signal)
wavfile.write(str("same.wav"), fs, signal)
wavfile.write(f'{args.outfile}', fs, signal)
if args.playaudiolive == "1":