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

TTSResponse

@dataclass
class TTSResponse(DictMixin)
源码Source agentscope/tts/_tts_response.py:30–56

TTS 模型的响应。位于 agentscope.tts 包,继承自 DictMixin。

The response of TTS models. Declared in agentscope.tts. Extends DictMixin.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
contentDataBlock | None
内容字段。
—
idstr
标识字段。
field(default_factory=lambda: _get_timestamp(True))
created_atstr
已创建 at字段。
field(default_factory=_generate_timestamp)
typeLiteral['tts']
类型字段。
field(default_factory=lambda: 'tts')
usageTTSUsage | None
用量字段。
field(default_factory=lambda: None)
metadatadict[str, JSONSerializableObject] | None
元数据字段。
field(default_factory=lambda: None)
is_lastbool
是最后字段。
field(default_factory=lambda: True)

属性详情Attribute Detail

content

DataBlock | None

内容字段。声明为 DataBlock | None。

The content field.

源码Source agentscope/tts/_tts_response.py:33

id

str = field(default_factory=lambda: _get_timestamp(True))

标识字段。声明为 str。

The id field.

源码Source agentscope/tts/_tts_response.py:38

created_at

str = field(default_factory=_generate_timestamp)

已创建 at字段。声明为 str。

The created at field.

源码Source agentscope/tts/_tts_response.py:41

type

Literal['tts'] = field(default_factory=lambda: 'tts')

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

The type field.

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

usage

TTSUsage | None = field(default_factory=lambda: None)

用量字段。声明为 TTSUsage | None。

The usage field.

源码Source agentscope/tts/_tts_response.py:47

metadata

dict[str, JSONSerializableObject] | None = field(default_factory=lambda: None)

元数据字段。声明为 dict[str, JSONSerializableObject] | None。

The metadata field.

源码Source agentscope/tts/_tts_response.py:50

is_last

bool = field(default_factory=lambda: True)

是最后字段。声明为 bool。

The is last field.

源码Source agentscope/tts/_tts_response.py:55
基于官方固定版本源码静态生成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.