Function: readTranscript()
readTranscript(
input,format):ReadTranscript
Defined in: packages/agentos/src/cognition/library/transcripts/index.ts:35
Reads a transcript file's text, or its bytes, in the format given. Bytes are read as UTF-16 when they open with its byte order mark, in either byte order, and as UTF-8 otherwise. A byte order mark is dropped and CRLF line ends are read as line feeds. A file with no turn reads as none; a length bound is the caller's.
Parameters
input
The file's text, or its bytes.
string | Uint8Array
format
Its format; a Word file is read from its bytes by readWordTranscript.
"srt" | "vtt" | "otter" | "fireflies" | "lines"
Returns
Throws
TranscriptReadError for a WebVTT text whose first line is not WEBVTT, a Fireflies text that is
not JSON, and the format docx.