mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
Merge branch 'main' of https://github.com/alibaba-damo-academy/FunASR into main
This commit is contained in:
commit
2aa7d91822
@ -232,6 +232,8 @@ scheduler_conf:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
内容可以复用,直接拷贝即可,需要注意字段 `file_path_metas` 所有内容会自动拼接模型资源路径,并且会覆盖 `config.yaml` 中相同字段的路径。
|
||||||
|
|
||||||
## 注册表
|
## 注册表
|
||||||
|
|
||||||
### 查看注册表
|
### 查看注册表
|
||||||
@ -242,7 +244,7 @@ from funasr.register import tables
|
|||||||
tables.print()
|
tables.print()
|
||||||
```
|
```
|
||||||
|
|
||||||
支持查看指定类型的注册表:\`tables.print("model")\`
|
支持查看指定类型的注册表,例如只看注册的`model`类:`tables.print("model")`
|
||||||
|
|
||||||
### 注册模型
|
### 注册模型
|
||||||
|
|
||||||
@ -284,6 +286,14 @@ model_conf:
|
|||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 注册失败
|
||||||
|
|
||||||
|
如果出现找不到注册模型或者注册函数,`assert model_class is not None, f'{kwargs["model"]} is not registered'`。模型注册的原理是,import 模型文件,可以通过import来查看具体注册失败原因,例如,上述模型文件为,funasr/models/sense_voice/model.py:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from funasr.models.sense_voice.model import *
|
||||||
|
```
|
||||||
|
|
||||||
## 注册原则
|
## 注册原则
|
||||||
|
|
||||||
* Model:模型之间互相独立,每一个模型,都需要在funasr/models/下面新建一个模型目录,不要采用类的继承方法!!!不要从其他模型目录中import,所有需要用到的都单独放到自己的模型目录中!!!不要修改现有的模型代码!!!
|
* Model:模型之间互相独立,每一个模型,都需要在funasr/models/下面新建一个模型目录,不要采用类的继承方法!!!不要从其他模型目录中import,所有需要用到的都单独放到自己的模型目录中!!!不要修改现有的模型代码!!!
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
1.1.12
|
1.1.13
|
||||||
Loading…
Reference in New Issue
Block a user