Let's define the function cleanText[]:
cleanText[text_String] :=
StringReplace[
text, {Whitespace ~~ "er" | "um" | "s-," ~~ Whitespace :> " ",
Whitespace ~~ "\n" :> " ",
Whitespace ~~ "[" ~~ ___ ~~ "]" ~~ Whitespace :> " "}]
and let's apply it on the audio transcription sample:
In[2]:= cleanText@"okay well er today we're er going to be carrying \
on with the er French \nRevolution you may have noticed i was sort of \
getting rather er enthusiastic \nand carried away at the end of the \
last one i was sort of almost er like i sort \nof started at the \
beginning about someone standing on a coffee table and s-, \nshouting \
to arms let's storm the Rootes Social Building [laughter] or er let's \
go \nout arm in arm singing the Marseillaise or something er like that"
Out[2]= "okay well today we're going to be carrying on with the \
French Revolution you may have noticed i was sort of getting rather \
enthusiastic and carried away at the end of the last one i was sort \
of almost like i sort of started at the beginning about someone \
standing on a coffee table and shouting to arms let's storm the \
Rootes Social Building or let's go out arm in arm singing the \
Marseillaise or something like that"