From afdde689ba93b74ba39061bd1cb5b6744ca239d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=97=8D+85CD?= <50108258+kwaa@users.noreply.github.com> Date: Mon, 27 Oct 2025 16:42:19 +0800 Subject: [PATCH] refactor(stream-transcription): update tsdoc, rename key --- packages/stream-transcription/src/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/stream-transcription/src/index.ts b/packages/stream-transcription/src/index.ts index 6015e3a..bff7afa 100644 --- a/packages/stream-transcription/src/index.ts +++ b/packages/stream-transcription/src/index.ts @@ -11,19 +11,23 @@ export interface StreamTranscriptionDelta { } export type StreamTranscriptionDeltaType = 'transcript.text.delta' | 'transcript.text.done' + export interface StreamTranscriptionOptions extends GenerateTranscriptionOptions { responseFormat?: never + /** + * If you want to disable stream, use `@xsai/generate-transcription`. + */ stream?: never - timestampGranularities?: never } export interface StreamTranscriptionResult { fullStream: ReadableStream - fullText: Promise + text: Promise textStream: ReadableStream } +/** @experimental */ export const streamTranscription = (options: WithUnknown): StreamTranscriptionResult => { let textStreamCtrl: ReadableStreamDefaultController | undefined let fullStreamCtrl: ReadableStreamDefaultController | undefined @@ -96,7 +100,7 @@ export const streamTranscription = (options: WithUnknown