我想将单词转换为其 Arpabet 翻译。
比如:
HELLO HH AH L OW
但我想用java以编程方式完成它,sphinx在这里提供了一个网络工具 http://www.speech.cs.cmu.edu/tools/lmtool.html。我知道我可以使用套接字在 Java 中请求此工具并嗅探返回的 .dic 文件,但我无法使用它,因为并非我的应用程序的所有用户都有互联网连接。
我还检查了 Sphinx 的 logios 包,但它是用 perl 和批处理文件编写的。我可以使用它,但我想让我的应用程序独立于平台,并且我认为如果我在项目中包含 perl shell 有点过分了。
如果有任何我可以重用的 java 库或算法,那么我可以执行类似 ConvertToSphinxArpabet("HELLO")
的操作,然后返回“HH AH L OW”字符串。
I want to convert words to its Arpabet translation.
Something like:
HELLO HH AH L OW
But I want to do it programatically in java, sphinx offers a web tool here http://www.speech.cs.cmu.edu/tools/lmtool.html. I know I can request this tool in Java using sockets and sniffing out the .dic file returned but I cannot use this because not all users of my app has an internet connection.
I also checked-out logios package of Sphinx but it is written in perl and batch files. I can use it but I want to make my app platform-independent and I think it is a bit overboard if I include perl shell in my project.
If there's any java library or algorithm that I can reuse so I can just do something like ConvertToSphinxArpabet("HELLO")
and I get the "HH AH L OW" string returned.
发布评论
评论(1)
请查看教程:
http://cmusphinx.sourceforge.net/wiki/tutorialdict
例如,您可以使用 FreeTTS 中用 Java 编写的 g2p 代码:
http://cmusphinx.sourceforge.net/projects/freetts
OpenMary Java TTS:
http ://mary.dfki.de/
对于 FreeTTS 示例,请参阅长音频对齐器分支中的代码:
http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx/branches/long-audio-aligner/Aligner/src/edu/cmu/sphinx/linguist/dictionary/AllWordDictionary.java?revision=第11092章
Please check the tutorial:
http://cmusphinx.sourceforge.net/wiki/tutorialdict
For example you can use g2p code from FreeTTS written in Java:
http://cmusphinx.sourceforge.net/projects/freetts
OpenMary Java TTS:
http://mary.dfki.de/
For FreeTTS example see our code in the long audio aligner branch:
http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx/branches/long-audio-aligner/Aligner/src/edu/cmu/sphinx/linguist/dictionary/AllWordDictionary.java?revision=11092&view=markup