DICT.CN的web API 已经close了,本想好,调用下接口把读音给抓下来。幸好,网上还是有好多的资源可以用的。昨天回去的时候,做了一个QQ的word抓音标的例子,还是大公司好,虽然非常的BS腾讯这狗抄袭人家的创意甚至是产品。
下面是几个开发的API测试了了是用于用的,但是你的程序中,文件要甚至成为UTF-8的编码,否则,被抓下来的音标是乱码。
2.爱词霸
http://dict-co.iciba.com/api/dictionary.php?w=#{word}
返回格式XML
<?xml version="1.0" encoding="UTF-8"?>
<dict num="219" id="219" name="219">
<key>will</key>
<ps>wil,wəl,əl,l</ps>
<pron>http://res.iciba.com/resource/amp3/1/8/18218139eec55d83cf82679934e5cd75.mp3</pron>
<pos>n.</pos>
<acceptation>意志, 决心, 意向, 遗嘱</acceptation>
<pos>v.</pos>
<acceptation>aux.将, 愿意, 必须</acceptation>
<sent>
<orig>We will.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/1/e/1ece4c394ade54ec3327883821c256db.mp3</pron>
<trans>我们会的。</trans>
</sent>
<sent>
<orig>ill will</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/3/4/34f9c8e6b4f1e88b6efba3000c166f67.mp3</pron>
<trans>恶意</trans>
</sent>
<sent>
<orig>Will they?</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/2/0/20d580950b625b80d872bb449fad880e.mp3</pron>
<trans>是吗?</trans>
</sent>
<sent>
<orig>Will do.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/1/0/105d2e8ca45f93a6eb40a48fc3447d92.mp3</pron>
<trans>好的。</trans>
</sent>
<sent>
<orig>Thanks.I will.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/b/d/bd9e3c70eaa8b4fea8b3a282124edbd4.mp3</pron>
<trans>好的,多谢。</trans>
</sent>
</dict>
<?xml version="1.0" encoding="UTF-8"?>
3.QQ词典
http://dict.qq.com/dict?q=#{word}
返回格式JSON
{
"local": [
{
"word": "word",
"sd": "0f39bcd7f6df740236abce2cc7f696d2",
"pho": [
"wə:d"
],
"des": [
{
"p": "n.",
标签:http,iciba,音标,API,mp3,res,resource,android,com
From: https://blog.51cto.com/u_16034393/6625804