%% Transcript processing function
%
% A function to process transcripts from MS Stream. Typical transcripts, as downloaded from MS Stream contain a lot of unnecessary information. To remove the unnecessary information from the transcript and publish it as a standalone text, supply the path of the file as downloaded from MS Stream, its name, including any extensions such as .vtt or .txt, and the output filename (again including extensions such as .txt.
%

function  processTranscript(path,inputfile,outputfile)

cd(path) % Find the path
a = readlines(inputfile); % get the transcript
if strncmpi(a(12),'00',2)==1 %determine the starting point and the step
    start=12;
    step=6;
else
    start=11;
    step=5;
end
a(1:start) =[];
b = a(1:step:end); % Keep every sixth line
ff = fopen(outputfile,'w');
fprintf(ff,'%s \n',b);