类class
agentscope.ttsTTSModelCard
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 |
|---|---|---|---|
type | Literal['tts_model'] | 类型字段。 | 'tts_model' |
name | str | TTS 模型的名称。 | Field(description='The name of the TTS model') |
label | str | 模型标签。 | Field(description='The model label.') |
status | Literal['active', 'deprecated', 'sunset'] | 模型状态。 | Field(default='active', title='Status', description='The model status') |
deprecated_at | datetime | None | `deprecated_at` 字段。 | Field(default=None, description='The model deprecation date and time.', title='Deprecation date') |
input_types | list[str] | 输入类型字段。 | Field(description='The supported model input types.', title='Input types', default=['text/plain']) |
output_types | list[str] | 输出类型字段。 | Field(description='The supported model output types.', title='Output types', default=['audio/wav']) |
realtime | bool | 判断是否模型支持流式输入(实时)。 | Field(default=False, description='Whether the model supports streaming input (realtime).', title='Realtime') |
parameter_schema | dict | 参数模式字段。 | — |
parameters_overrides | dict[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:14name
str = Field(description='The name of the TTS model')TTS 模型的名称。
The name of the TTS model
源码Source
agentscope/tts/_tts_model_card.py:17label
str = Field(description='The model label.')模型标签。
The model label.
源码Source
agentscope/tts/_tts_model_card.py:20status
Literal['active', 'deprecated', 'sunset'] = Field(default='active', title='Status', description='The model status')模型状态。
The model status
源码Source
agentscope/tts/_tts_model_card.py:23deprecated_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:30input_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:37output_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:44realtime
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:51parameter_schema
dict参数模式字段。声明为 dict。
The parameter schema field.
源码Source
agentscope/tts/_tts_model_card.py:58parameters_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_path | str | yaml 路径(类型 `str`)。Path to the YAML file |
parameter_class | Type[BaseModel] | 参数类(类型 `Type[BaseModel]`)。The parameter class (e.g., DashScopeTTSModel.Parameters) |
Self
返回自身。`TTSModelCard`:
源码Source
agentscope/tts/_tts_model_card.py:65–134