I have a variable containing an IPA string, for example ipa_str = "[aɪ̯ pʰiː eɪ̯]"
. How can I convert its pronunciation to an audio file (any format, .mp3, .wav, .ogg, etc.) in Python, like phonemes to speech? For example, the IPA string given above should be converted to an audio file sounding like this.
In other words: Is there a way to achieve the same things this website does, but as a Python library?
I have looked around the internet for a few hours, but all the results are about text to speech (normal text, not IPA) or speech to text/phonems. I know, I could just iterate over each “letter” (IPA phoneme) in the string and play an audio file for each one, but I’m sure that will sound laggy or weird.