Phonetic/IPA to speech generator

Hi there!
I want to create a program which will pronounce the written word by syllables. Right now I have an idea to input the word’s written pronunciation from dictionaries (f.e.ˈæp·əl for apple)
Can you please suggest models to use, since I tries most popular TTS models but they didn’t work. Or should I somehow specify the written pronunciation by tags?

Thank you in advance