类class
agentscope.asrASRModelCard
class ASRModelCard(BaseModel)
源码Source
agentscope/asr/_asr_model_card.py:10–63ASR 模型卡片,处理低延迟的实时语音与多模态交互。位于 agentscope.asr 包。核心成员包括 from_yaml。
A model and its supported audio input types. Declared in agentscope.asr.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal['asr_model'] | 类型字段。 | 'asr_model' |
name | str | 名称字段。 | Field(description='The model identifier used in provider API calls.') |
label | str | 标签字段。 | Field(description='The human-readable model label.') |
input_types | list[str] | 输入类型字段。 | Field(default_factory=list, description='The supported audio input media types.') |
output_types | list[str] | 输出类型字段。 | Field(default_factory=lambda: ['text/plain'], description='The supported transcription output media types.') |
realtime | bool | 判断是否模型支持实时流式输入。 | Field(default=False, description='Whether the model supports realtime streaming input.') |
parameter_schema | dict | 参数模式字段。 | Field(description='The JSON schema for provider-specific parameters.') |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
def from_yaml(yaml_path: str, parameter_class: Type[BaseModel]) -> Self | 执行 `from_yaml` 方法。 Load a card and the implementation's parameter schema. |
属性详情Attribute Detail
type
Literal['asr_model'] = 'asr_model'类型字段。声明为 Literal['asr_model']。
The type field.
源码Source
agentscope/asr/_asr_model_card.py:13name
str = Field(description='The model identifier used in provider API calls.')名称字段。声明为 str。
The model identifier used in provider API calls.
源码Source
agentscope/asr/_asr_model_card.py:16label
str = Field(description='The human-readable model label.')标签字段。声明为 str。
The human-readable model label.
源码Source
agentscope/asr/_asr_model_card.py:21input_types
list[str] = Field(default_factory=list, description='The supported audio input media types.')输入类型字段。声明为 list[str]。
The supported audio input media types.
源码Source
agentscope/asr/_asr_model_card.py:24output_types
list[str] = Field(default_factory=lambda: ['text/plain'], description='The supported transcription output media types.')输出类型字段。声明为 list[str]。
The supported transcription output media types.
源码Source
agentscope/asr/_asr_model_card.py:30realtime
bool = Field(default=False, description='Whether the model supports realtime streaming input.')判断是否模型支持实时流式输入。
Whether the model supports realtime streaming input.
源码Source
agentscope/asr/_asr_model_card.py:36parameter_schema
dict = Field(description='The JSON schema for provider-specific parameters.')参数模式字段。声明为 dict。
The JSON schema for provider-specific parameters.
源码Source
agentscope/asr/_asr_model_card.py:42方法详情Method Detail
from_yaml
def from_yaml(yaml_path: str, parameter_class: Type[BaseModel]) -> Self
执行 from_yaml 方法。
Load a card and the implementation's parameter schema.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
yaml_path | str | yaml 路径(类型 `str`)。The yaml path. |
parameter_class | Type[BaseModel] | 参数类(类型 `Type[BaseModel]`)。The parameter class. |
Self
返回自身。Returns self.
源码Source
agentscope/asr/_asr_model_card.py:48–63