Skip to content

Commit

Permalink
feat: better cli
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed May 1, 2022
1 parent 0b7062d commit 5a8ad6d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/aspeak/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
parser = argparse.ArgumentParser(
description='This program uses trial auth token of Azure Cognitive Services to do speech synthesis for you.',
prog='aspeak')
parser.add_argument('-V', '--version', action='version', version='%(prog)s 0.2.1')
group = parser.add_mutually_exclusive_group()
group.add_argument('-t', '--text', help='Text to speak. Left blank when reading from file/stdin.',
dest='text', nargs='?', default=argparse.SUPPRESS)
group.add_argument('-s', '--ssml', help='SSML to speak. Left blank when reading from file/stdin.',
dest='ssml', nargs='?', default=argparse.SUPPRESS)
group.add_argument('-V', '--version', action='version', version='%(prog)s 0.2.1')
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument('-t', '--text', help='Text to speak. Left blank when reading from file/stdin.',
dest='text', nargs='?', default=argparse.SUPPRESS)
subgroup.add_argument('-s', '--ssml', help='SSML to speak. Left blank when reading from file/stdin.',
dest='ssml', nargs='?', default=argparse.SUPPRESS)
parser.add_argument('-f', '--file', help='Text/SSML file to speak, default to `-`(stdin).', dest='file',
default=argparse.SUPPRESS)
parser.add_argument('-o', '--output', help='Output wav file path', dest='output_path', default=None)
parser.add_argument('-l', '--locale', help='Locale to use, default to en-US', dest='locale', default='en-US')
parser.add_argument('-v', '--voice', help='Voice to use, default to en-US-JessaRUS', dest='voice', default=None)
parser.add_argument('-v', '--voice', help='Voice to use.', dest='voice', default=None)


def read_file(args):
Expand Down

0 comments on commit 5a8ad6d

Please sign in to comment.