TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
94 stars 49 forks source link

Fix option checking for Transcription Service #81

Open TomFrankly opened 3 months ago

TomFrankly commented 3 months ago

This line should be changed:

// Set the full transcript based on which transcription service was used
        fileInfo.full_transcript =
            this.transcription_service === "OpenAI"
                ? await this.combineWhisperChunks(fileInfo.whisper)
                : fileInfo.deepgram.raw_transcript;

The user can accidentally clear the Transcription Service option, so we should explicitly check for a value and pre-throw an error if it's not there.

https://github.com/TomFrankly/pipedream-notion-voice-notes/blob/main/Notion-Voice-Notes.mjs#L2392C3-L2396C40