adding another argument to provide a custom output file
This commit is contained in:
parent
9415e8fba2
commit
91ea00fb03
6
same.py
6
same.py
@ -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 datetime # EAS alerts are heavily dependent on timestamps so this makes it easy to send a thing now
|
||||||
import argparse
|
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
|
# parse command-line arguments
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("--playaudiolive", "-pal", nargs='?', default=-1)
|
parser.add_argument("--playaudiolive", "-pal", nargs='?', default=-1)
|
||||||
parser.add_argument("--code", "-c", nargs='?', default="none")
|
parser.add_argument("--code", "-c", nargs='?', default="none")
|
||||||
|
parser.add_argument("--outfile","-o", nargs='?', default="same.wav")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@ -180,7 +184,7 @@ signal *= 32767
|
|||||||
|
|
||||||
signal = np.int16(signal)
|
signal = np.int16(signal)
|
||||||
|
|
||||||
wavfile.write(str("same.wav"), fs, signal)
|
wavfile.write(f'{args.outfile}', fs, signal)
|
||||||
|
|
||||||
|
|
||||||
if args.playaudiolive == "1":
|
if args.playaudiolive == "1":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user