有什么工具可以将日语句子以编程方式转换为罗马字(语音阅读)吗?

问题描述:

输入:

日本が好きです.

日本が好きです.

输出:

日本ga sukidesu.

Nippon ga sukidesu.

不幸的是,语音翻译无法通过Google Translate API获得.

Phonetical reading is unfortunately not available through Google Translate API.

KAKASI 是一个很好的简单工具,可以满足您的需求:

KAKASI is a good, simple tool for what you want to do:

% echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippongasukidesu.

% echo "日本が好きです。" | iconv -f utf8 -t eucjp | kakasi -i euc -w | kakasi -i euc -Ha -Ka -Ja -Ea -ka
nippon ga suki desu .

或者另一个解决方案是使用 Yahoo! JAPAN的日语语言处理API . 但这可能很难使用,因为您需要注册Yahoo!. JAPAN并在使用前注册API密钥,并且文档仅提供日语版本.

Or another solution is to use Yahoo! JAPAN's Japanese Language Processing API. But it might be difficult to use because you need to sign up for Yahoo! JAPAN and register for the API key before using it and the documents are only available in Japanese.