19 lines
559 B
Python
19 lines
559 B
Python
from typing import List
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class QueryDataSentence(BaseModel):
|
|
answer: str = Field(description="文本label")
|
|
start: float = Field(description="句子开始时间")
|
|
end: float = Field(description="句子结束时间")
|
|
|
|
|
|
class QueryData(BaseModel):
|
|
lang: str = Field(description="语言")
|
|
file: str = Field(description="音频文件位置")
|
|
duration: float = Field(description="音频长度")
|
|
voice: List[QueryDataSentence] = Field(
|
|
description="音频文件的文本label内容"
|
|
)
|