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

TTSModelCard

class TTSModelCard(BaseModel)
源码Source agentscope/tts/_tts_model_card.py:11–134

模型卡片类用于 TTS 模型。位于 agentscope.tts 包。核心成员包括 from_yaml。

The model card class for TTS models. Declared in agentscope.tts.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral['tts_model']
类型字段。
'tts_model'
namestr
TTS 模型的名称。
Field(description='The name of the TTS model')
labelstr
模型标签。
Field(description='The model label.')
statusLiteral['active', 'deprecated', 'sunset']
模型状态。
Field(default='active', title='Status', description='The model status')
deprecated_atdatetime | None
`deprecated_at` 字段。
Field(default=None, description='The model deprecation date and time.', title='Deprecation date')
input_typeslist[str]
输入类型字段。
Field(description='The supported model input types.', title='Input types', default=['text/plain'])
output_typeslist[str]
输出类型字段。
Field(description='The supported model output types.', title='Output types', default=['audio/wav'])
realtimebool
判断是否模型支持流式输入(实时)。
Field(default=False, description='Whether the model supports streaming input (realtime).', title='Realtime')
parameter_schemadict
参数模式字段。
—
parameters_overridesdict[str, dict]
`parameters_overrides` 字段。
—

方法摘要Method Summary

方法Method说明Description
def from_yaml(yaml_path: str, parameter_class: Type[BaseModel]) -> Self
执行 `from_yaml` 方法。
Read a TTS model card from a YAML file.

属性详情Attribute Detail

type

Literal['tts_model'] = 'tts_model'

类型字段。声明为 Literal['tts_model']。

The type field.

源码Source agentscope/tts/_tts_model_card.py:14

name

str = Field(description='The name of the TTS model')

TTS 模型的名称。

The name of the TTS model

源码Source agentscope/tts/_tts_model_card.py:17

label

str = Field(description='The model label.')

模型标签。

The model label.

源码Source agentscope/tts/_tts_model_card.py:20

status

Literal['active', 'deprecated', 'sunset'] = Field(default='active', title='Status', description='The model status')

模型状态。

The model status

源码Source agentscope/tts/_tts_model_card.py:23

deprecated_at

datetime | None = Field(default=None, description='The model deprecation date and time.', title='Deprecation date')

deprecated_at 字段。声明为 datetime | None。

The model deprecation date and time.

源码Source agentscope/tts/_tts_model_card.py:30

input_types

list[str] = Field(description='The supported model input types.', title='Input types', default=['text/plain'])

输入类型字段。声明为 list[str]。

The supported model input types.

源码Source agentscope/tts/_tts_model_card.py:37

output_types

list[str] = Field(description='The supported model output types.', title='Output types', default=['audio/wav'])

输出类型字段。声明为 list[str]。

The supported model output types.

源码Source agentscope/tts/_tts_model_card.py:44

realtime

bool = Field(default=False, description='Whether the model supports streaming input (realtime).', title='Realtime')

判断是否模型支持流式输入(实时)。

Whether the model supports streaming input (realtime).

源码Source agentscope/tts/_tts_model_card.py:51

parameter_schema

dict

参数模式字段。声明为 dict。

The parameter schema field.

源码Source agentscope/tts/_tts_model_card.py:58

parameters_overrides

dict[str, dict]

parameters_overrides 字段。声明为 dict[str, dict]。

The parameters overrides field.

源码Source agentscope/tts/_tts_model_card.py:61

方法详情Method Detail

from_yaml

def from_yaml(yaml_path: str, parameter_class: Type[BaseModel]) -> Self

执行 from_yaml 方法。

Read a TTS model card from a YAML file.

参数Parameters
名称Name类型Type说明Description
yaml_pathstryaml 路径(类型 `str`)。Path to the YAML file
parameter_classType[BaseModel]参数类(类型 `Type[BaseModel]`)。The parameter class (e.g., DashScopeTTSModel.Parameters)
返回Returns Self
返回自身。`TTSModelCard`:
源码Source agentscope/tts/_tts_model_card.py:65–134
基于官方固定版本源码静态生成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.