Skip to content

Commit dd53da1

Browse files
Update talk.py (#89)
fix empty output path
1 parent 08d11c3 commit dd53da1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/tts/talk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ def parse_args() -> argparse.Namespace:
5151
)
5252
parser = add_connection_argparse_parameters(parser)
5353
args = parser.parse_args()
54-
if not args.output.strip():
55-
print("Empty output file path not allowed")
56-
return
5754
if args.output is not None:
5855
args.output = args.output.expanduser()
5956
if args.list_devices or args.output_device or args.play_audio:
@@ -63,6 +60,9 @@ def parse_args() -> argparse.Namespace:
6360

6461
def main() -> None:
6562
args = parse_args()
63+
if args.output.is_dir():
64+
print("Empty output file path not allowed")
65+
return
6666
if args.list_devices:
6767
riva.client.audio_io.list_output_devices()
6868
return

0 commit comments

Comments
 (0)