This library is designed to convert Chinese text into Japanese Katakana characters based on their pronunciation.
- 凱文要不要吃香蕉
translate_tts.mov
- 你應該要被加薪
translate_tts.mov
- 哩喜嘞工三小
translate_tts.mov
Prerequisite: pinyin-kana requires Python 3.7 or higher
pip install pinyin-kana
Here's a simple example of how to use the PronounceConverter
class to convert Chinese text to Katakana:
from pinyin_kana import to_katakana
result = to_katakana("你好")
print(" ".join(result))
print(
f"https://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&tl=ja&q={'+'.join(result)}"
)