chengsokdara / use-whisper

React hook for OpenAI Whisper with speech recorder, real-time transcription, and silence removal built-in
MIT License
735 stars 139 forks source link

verbose_json: Return full response from openAI #42

Open phpepe opened 1 year ago

phpepe commented 1 year ago

When response format is set to verbose_json (on whisper options) it keeps returning only the clean text and for example not the segments array when building a transcription timeline.

Added the raw response that comes from OpenAI and updated UseWhisperTranscript type.

export type UseWhisperTranscript = { blob?: Blob text?: string response?: any // support for verbose_json }