How to implement text-to-speech in React-native for heteronyms?

I have an array of words and want to enable my users to listen to them. However, there’s a chance of encountering a heteronym (a word spelled the same as another but pronounced differently).

My idea is to find a TTS (Text-to-Speech) library that accepts transcriptions (like dʌk) as input. Do you have any ideas about such libraries, or perhaps know of another approach to solve my issue?

Thanks.