| | |
| | | if isinstance(data_i, str) and os.path.exists(data_i): |
| | | key = misc.extract_filename_without_extension(data_i) |
| | | else: |
| | | key = "rand_key_" + "".join(random.choice(chars) for _ in range(13)) |
| | | if key is None: |
| | | key = "rand_key_" + "".join(random.choice(chars) for _ in range(13)) |
| | | key_list.append(key) |
| | | |
| | | else: # raw text; audio sample point, fbank; bytes |
| | |
| | | |
| | | def __init__(self, **kwargs): |
| | | |
| | | try: |
| | | from funasr.utils.version_checker import check_for_update |
| | | |
| | | check_for_update() |
| | | except: |
| | | pass |
| | | |
| | | log_level = getattr(logging, kwargs.get("log_level", "INFO").upper()) |
| | | logging.basicConfig(level=log_level) |
| | | |