Output WAV when stdout is not a TTY
This commit is contained in:
parent
746fa228cf
commit
62a58d38ff
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ def main():
|
||||||
if args.output:
|
if args.output:
|
||||||
args.output.write_bytes(wav_bytes)
|
args.output.write_bytes(wav_bytes)
|
||||||
_LOGGER.info("Wrote WAV data to %s", args.output)
|
_LOGGER.info("Wrote WAV data to %s", args.output)
|
||||||
elif args.stdout:
|
elif args.stdout or (not sys.stdout.isatty()):
|
||||||
_LOGGER.debug("Writing WAV data to stdout")
|
_LOGGER.debug("Writing WAV data to stdout")
|
||||||
sys.stdout.buffer.write(wav_bytes)
|
sys.stdout.buffer.write(wav_bytes)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue