'Convert transcript `content` from `input_format` to `output_format`.
Accepted input formats: sjson, srt.
Accepted output format: srt, txt.'

@staticmethod
def convert(content, input_format, output_format):

    assert (input_format in ('srt', 'sjson'))
    assert (output_format in ('txt', 'srt', 'sjson'))
    if (input_format == output_format):
        return content
    if (input_format == 'srt'):
        if (output_format == 'txt'):
            text = SubRipFile.from_string(content.decode('utf8')).text
            return HTMLParser().unescape(text)
        elif (output_format == 'sjson'):
            raise NotImplementedError
    if (input_format == 'sjson'):
        if (output_format == 'txt'):
            text = json.loads(content)['text']
            return HTMLParser().unescape('\n'.join(text))
        elif (output_format == 'srt'):
            return generate_srt_from_sjson(json.loads(content), speed=1.0)
