feat(asr): [PKG-ASR-09] add explicit capture ownership and cancel stale restarts

This commit is contained in:
Harvey Zhao committed 2026-09-13 16:19:49 +08:00
1 parent 5ab7da6e1f
commit 146b78d576
27 files changed
+12951 -64

No files matched your search

@@ -25,6 +25,8 @@ export type Factory = (option?: AsrPluginOption) => (art: Artplayer) => AsrPlugi
/** Accurate asynchronous view available through the /runtime entry. */
export interface RuntimeOption extends Omit<AsrPluginOption, 'onAudioChunk'> {
/** Capture the media stream without taking ownership of its playback route. */
audioInput?: { type: 'capture' }
onAudioChunk?: (chunk: AudioChunk) => string | void | null | Promise<string | void | null>
}