AS AgentScopeAPI 手册 / API Reference
类class agentscope.asr

ASRModelCard

class ASRModelCard(BaseModel)
源码Source agentscope/asr/_asr_model_card.py:10–63

ASR 模型卡片,处理低延迟的实时语音与多模态交互。位于 agentscope.asr 包。核心成员包括 from_yaml。

A model and its supported audio input types. Declared in agentscope.asr.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral['asr_model']
类型字段。
'asr_model'
namestr
名称字段。
Field(description='The model identifier used in provider API calls.')
labelstr
标签字段。
Field(description='The human-readable model label.')
input_typeslist[str]
输入类型字段。
Field(default_factory=list, description='The supported audio input media types.')
output_typeslist[str]
输出类型字段。
Field(default_factory=lambda: ['text/plain'], description='The supported transcription output media types.')
realtimebool
判断是否模型支持实时流式输入。
Field(default=False, description='Whether the model supports realtime streaming input.')
parameter_schemadict
参数模式字段。
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:13

name

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:16

label

str = Field(description='The human-readable model label.')

标签字段。声明为 str。

The human-readable model label.

源码Source agentscope/asr/_asr_model_card.py:21

input_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:24

output_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:30

realtime

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:36

parameter_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_pathstryaml 路径(类型 `str`)。The yaml path.
parameter_classType[BaseModel]参数类(类型 `Type[BaseModel]`)。The parameter class.
返回Returns Self
返回自身。Returns self.
源码Source agentscope/asr/_asr_model_card.py:48–63
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.