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