chore: add instruction to get help
This commit is contained in:
parent
8d7f8e9816
commit
d4faa8b09c
2 changed files with 45 additions and 37 deletions
|
@ -235,6 +235,14 @@ If you want to use a voice for a different language text (e.g., Japanese voice f
|
||||||
python tts.py -v jf_alpha "Hello there!" --force_lang a
|
python tts.py -v jf_alpha "Hello there!" --force_lang a
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Get help
|
||||||
|
|
||||||
|
You can see all available options by running the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python tts.py --help
|
||||||
|
```
|
||||||
|
|
||||||
## Demo Outputs
|
## Demo Outputs
|
||||||
|
|
||||||
### Voice: pro (ah_heart)
|
### Voice: pro (ah_heart)
|
||||||
|
|
74
tts.py
74
tts.py
|
@ -41,28 +41,7 @@ def parse_args():
|
||||||
type=str,
|
type=str,
|
||||||
nargs='?',
|
nargs='?',
|
||||||
default="",
|
default="",
|
||||||
help="Text to read",
|
help="text to read",
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--title",
|
|
||||||
"-t",
|
|
||||||
required=False,
|
|
||||||
type=str,
|
|
||||||
help="Title to use as label to the generated outputs",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--voice",
|
|
||||||
"-v",
|
|
||||||
required=False,
|
|
||||||
type=str,
|
|
||||||
default="pro",
|
|
||||||
help="Voice to use (pro, hot, asmr, brit)",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--force_lang",
|
|
||||||
required=False,
|
|
||||||
type=str,
|
|
||||||
help="Force language code",
|
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--input_file",
|
"--input_file",
|
||||||
|
@ -70,20 +49,48 @@ def parse_args():
|
||||||
required=False,
|
required=False,
|
||||||
type=str,
|
type=str,
|
||||||
default="demo/tongue-twister.txt",
|
default="demo/tongue-twister.txt",
|
||||||
help="Path to the input text file",
|
help="path to the input text file",
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--verbose",
|
|
||||||
default=False,
|
|
||||||
action="store_true",
|
|
||||||
help="Show verbose reports",
|
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--clipboard",
|
"--clipboard",
|
||||||
"-c",
|
"-c",
|
||||||
required=False,
|
required=False,
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Use text from the clipboard (i.e., copied text)",
|
help="use text from the clipboard (i.e., copied text)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--title",
|
||||||
|
"-t",
|
||||||
|
required=False,
|
||||||
|
type=str,
|
||||||
|
help="title to use as label to the generated outputs",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--voice",
|
||||||
|
"-v",
|
||||||
|
required=False,
|
||||||
|
type=str,
|
||||||
|
default="pro",
|
||||||
|
help="voice to use (pro, hot, asmr, brit)",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--skip_play",
|
||||||
|
"-s",
|
||||||
|
required=False,
|
||||||
|
action="store_true",
|
||||||
|
help="Prevent playing the generated audio",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--force_lang",
|
||||||
|
required=False,
|
||||||
|
type=str,
|
||||||
|
help="force language code",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--verbose",
|
||||||
|
default=False,
|
||||||
|
action="store_true",
|
||||||
|
help="show verbose reports",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--device",
|
"--device",
|
||||||
|
@ -93,13 +100,6 @@ def parse_args():
|
||||||
default=("cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else ("xpu" if torch.xpu.is_available() else "cpu"))),
|
default=("cuda" if torch.cuda.is_available() else ("mps" if torch.backends.mps.is_available() else ("xpu" if torch.xpu.is_available() else "cpu"))),
|
||||||
help="Device for inference: cuda | mps | cpu",
|
help="Device for inference: cuda | mps | cpu",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--skip_play",
|
|
||||||
"-s",
|
|
||||||
required=False,
|
|
||||||
action="store_true",
|
|
||||||
help="Prevent playing the generated audio",
|
|
||||||
)
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
def generate_audio(generator, name, voice):
|
def generate_audio(generator, name, voice):
|
||||||
|
|
Loading…
Reference in a new issue