stefantaubert / pinyin-to-ipa

Command-line interface and Python library to transcribe pinyin to IPA. The tones are attached to the vowel of the syllable.
https://hf.co/spaces/stefantaubert/pinyin-to-ipa
MIT License
26 stars 4 forks source link

Is it possible to use this to reversely convert IPA to pinyin? #1

Closed fishfree closed 3 weeks ago

fishfree commented 1 month ago

Especially converting those in a TextGrid file. Many thanks!

stefantaubert commented 1 month ago

A conversion from IPA to pinyin is not possible. It would be difficult to determine the syllables of an IPA transcribed word (which is required to convert each one to pinyin). One thing that you can do is to use one of these JSON mapping tables, e.g., this one, which were created using this tool, to reverse lookup the pinyin for single IPA syllables.