I'll help you along - this is the core function that Kitten ends up calling. Good luck!

https://github.com/espeak-ng/espeak-ng/blob/a4ca101c99de3534...