You could just use the transcript property itself:
const{Deepgram}=require('@deepgram/sdk');constfs=require('fs');constdeepgram=newDeepgram(DEEPGRAM_API_KEY)constaudioSource={url:URL_OF_FILE};deepgram.transcription.preRecorded(audioSource,{punctuate:true,// other options are available}).then((response)=>{constsrtTranscript=response.results.channels[0].alternatives[0].transcript;fs.writeFile(FILENAME_TO_SAVE,srtTranscript,function(err){if(err){returnconsole.log(err);}console.log("The file was saved!");});}).catch((err)=>{console.log(err);});
You could just use the transcript property itself:
Thanks a bunch @michaeljolley . You rock 🙌🚀