| | |
| | | from typing import List |
| | | from typing import Optional |
| | | |
| | | from typeguard import check_argument_types |
| | | |
| | | from funasr.utils.cli_utils import get_commandline_args |
| | | from funasr.text.build_tokenizer import build_tokenizer |
| | | from funasr.text.cleaner import TextCleaner |
| | | from funasr.text.phoneme_tokenizer import g2p_choices |
| | | from funasr.tokenizer.build_tokenizer import build_tokenizer |
| | | from funasr.tokenizer.cleaner import TextCleaner |
| | | from funasr.tokenizer.phoneme_tokenizer import g2p_classes |
| | | from funasr.utils.types import str2bool |
| | | from funasr.utils.types import str_or_none |
| | | |
| | |
| | | cleaner: Optional[str], |
| | | g2p: Optional[str], |
| | | ): |
| | | assert check_argument_types() |
| | | |
| | | logging.basicConfig( |
| | | level=log_level, |
| | |
| | | parser.add_argument( |
| | | "--g2p", |
| | | type=str_or_none, |
| | | choices=g2p_choices, |
| | | choices=g2p_classes, |
| | | default=None, |
| | | help="Specify g2p method if --token_type=phn", |
| | | ) |