MCPcopy Index your code
hub / github.com/simstudioai/sim / findTranscriptFile

Function findTranscriptFile

apps/sim/connectors/zoom/zoom.ts:118–126  ·  view source on GitHub ↗

* Picks the best transcript file from a recording's files array. * Prefers the AI Companion audio_transcript (file_type TRANSCRIPT) and falls back * to closed captions (file_type CC) — both are VTT and contain spoken text.

(files?: ZoomRecordingFile[])

Source from the content-addressed store, hash-verified

116 * to closed captions (file_type CC) — both are VTT and contain spoken text.
117 */
118function findTranscriptFile(files?: ZoomRecordingFile[]): ZoomRecordingFile | undefined {
119 if (!files) return undefined
120 const eligible = (f: ZoomRecordingFile) =>
121 Boolean(f.download_url) && (f.status === 'completed' || f.status == null)
122
123 const transcript = files.find((f) => f.file_type === 'TRANSCRIPT' && eligible(f))
124 if (transcript) return transcript
125 return files.find((f) => f.file_type === 'CC' && eligible(f))
126}
127
128/**
129 * Extracts spoken text from a Zoom WebVTT transcript, stripping cue identifiers,

Callers 1

zoom.tsFile · 0.85

Calls 1

eligibleFunction · 0.85

Tested by

no test coverage detected