How can I produce custom text in a template?

I am trying to output the time in words in a template, for example:
10:15 = quarter past ten

I researched plenty of methods but did not find a way to produce custom text in the template. Also if I understand correctly is not possible to create custom template functions.

What would be the best approach to generate that text? I would need it in a template because I want to use it as part of one intent.

intent_script:
  GetTime:
    speech:
      text: It's {{ strftime(states('sensor.time'), '%H %M') }}