Skip to content

Convert Chinese text into Japanese Katakana characters based on their pronunciation

License

Notifications You must be signed in to change notification settings

RUI-LONG/Python-Pinyin-Kana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chinese Pronounce in Kana

ZH README

Overview

This library is designed to convert Chinese text into Japanese Katakana characters based on their pronunciation.

Demo

  1. 凱文要不要吃香蕉
translate_tts.mov
  1. 你應該要被加薪
translate_tts.mov
  1. 哩喜嘞工三小
translate_tts.mov

Installation

Prerequisite: pinyin-kana requires Python 3.7 or higher

PYPI

pip install pinyin-kana

Usage

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)}"
)

About

Convert Chinese text into Japanese Katakana characters based on their pronunciation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages