pub struct AlignRequest {
pub audio: Option<AudioInput>,
pub text: String,
pub language: String,
pub options: BTreeMap<String, Value>,
}Expand description
强制对齐(Alignment)的请求参数:音频 + 待对齐文本 + 文本语言。
序列化形状为顶层 audio(或 audio_path)+ text + language(+ 可选
options),对应 shim parse_task_request 填充的上游 TaskRequest 的
audio_input + text_input{ text, language }。两对齐族(qwen3_forced_aligner /
mms_forced_aligner)均要求文本与语言非空,否则上游抛错。
Fields§
§audio: Option<AudioInput>待对齐音频(文件路径或内嵌数据)。
text: String待对齐的文本转写(需与音频内容一致,越贴合时间戳越准)。
language: String文本语言(必填,上游不支持 "auto",见 Request::align)。
options: BTreeMap<String, Value>附加选项键值(如 clamp_timestamps_to_audio)。
Implementations§
Trait Implementations§
Source§impl Clone for AlignRequest
impl Clone for AlignRequest
Auto Trait Implementations§
impl Forget for AlignRequest
impl Freeze for AlignRequest
impl RefUnwindSafe for AlignRequest
impl Send for AlignRequest
impl Sync for AlignRequest
impl Unpin for AlignRequest
impl UnsafeUnpin for AlignRequest
impl UnwindSafe for AlignRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more