* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* train

* whisper_lib for sense voice

* aishell recipe

* sense voice

* docs

* bugfix
This commit is contained in:
zhifu gao 2024-04-02 11:11:23 +08:00 committed by GitHub
parent 48693b45c0
commit edb9656176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,18 +19,19 @@ def import_submodules(package, recursive=True):
package = importlib.import_module(package) package = importlib.import_module(package)
except Exception as e: except Exception as e:
# 如果想要看到导入错误的具体信息,可以取消注释下面的行 # 如果想要看到导入错误的具体信息,可以取消注释下面的行
# print(f"Failed to import {name}: {e}") # print(f"Failed to import {package}: {e}")
pass pass
results = {} results = {}
for loader, name, is_pkg in pkgutil.walk_packages(package.__path__, package.__name__ + '.'): if not isinstance(package, str):
try: for loader, name, is_pkg in pkgutil.walk_packages(package.__path__, package.__name__ + '.'):
results[name] = importlib.import_module(name) try:
except Exception as e: results[name] = importlib.import_module(name)
# 如果想要看到导入错误的具体信息,可以取消注释下面的行 except Exception as e:
# print(f"Failed to import {name}: {e}") # 如果想要看到导入错误的具体信息,可以取消注释下面的行
pass # print(f"Failed to import {name}: {e}")
if recursive and is_pkg: pass
results.update(import_submodules(name)) if recursive and is_pkg:
results.update(import_submodules(name))
return results return results
import_submodules(__name__) import_submodules(__name__)