mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-09-04 23:26:51 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Optional
|
||||
|
||||
@dataclass
|
||||
class TranscriptSegment:
|
||||
start: float # 开始时间(秒)
|
||||
end: float # 结束时间(秒)
|
||||
text: str # 该段文字
|
||||
|
||||
@dataclass
|
||||
class TranscriptResult:
|
||||
language: Optional[str] # 检测语言(如 "zh"、"en")
|
||||
full_text: str # 完整合并后的文本(用于摘要)
|
||||
segments: List[TranscriptSegment] # 分段结构,适合前端显示时间轴字幕等
|
||||
raw: Optional[dict] = None # 原始响应数据,便于调试或平台特性处理
|
||||
Reference in New Issue
Block a user