使用jdb调试

发布于 2024-12-03 04:33:48 字数 895 浏览 2 评论 0原文

为了找出解决 Sphinx 4(Java 中的 CMU 语音识别引擎)的方法,我尝试使用发行版中包含的演示,将其更改为我想要的功能(名称该演示是Aligner)。我遇到了问题,想从命令行使用 jdb 进行调试。我阅读了此处给出的文档,但它是有限的,没有解决我的问题的方法,简要如下:

  1. 我像这样调用jdb
    jdb Aligner(项目主类的名称)。
  2. 像这样设置断点:停在 Aligner:33
    我得到的输出(在命令行上):
    延迟断点对齐器:33。
    它将在类加载后设置。

  3. 在文件 demo.xml(这是该项目的 makefile 等效项)中,
    提到了 javac debug=true

我的问题:
1. 我应该从哪里调用jdb?应该从整个 sphinx 目录中的任何位置调用它,还是应该从与 Aligner.java 相同的目录中调用它?
2. 如何在该项目中使用 jdbjar

PS:我知道我可以使用 Eclipse 来实现这一点,但我不确定我知道如何做到这一点。我的首要任务是启动并运行它。

PPS:我是一个Java新手,对该语言了解不多。我对命令行的偏好来自于我在命令行上进行 C/C++ 编程的背景。

非常欢迎任何帮助,
谢谢!

Trying to figure out my way around Sphinx 4 (the CMU speech recognition engine in Java), I tried to use a demo included with the distribution by altering it to what I wanted it to do (the name of the demo is Aligner). I am running into problems and want to use jdb from the command line for debugging the same. I read the documentation given here, but it is limited and does not have a solution to my problem, which in brief is as follows:

  1. I invoke jdb like so:
    jdb Aligner (name of the main class of the project).
  2. Set a breakpoint like so: stop at Aligner:33
    The output I get (on the command line):
    Deferring breakpoint Aligner:33.
    It will be set after the class is loaded.

  3. In the file demo.xml (which is the makefile equivalent for this Project),
    javac debug=true is mentioned.

My questions:
1. Where should I invoke jdb from? Should it be invoked from anywhere in the entire sphinx directory or should I invoke it from the same directory as Aligner.java?
2. How can I use jdb with the jar for this project?

P.S: I know I can use Eclipse with this, but I am not sure I know how to do that. My first priority is to get this up and running.

P.P.S: I am a Java newbie and do not know much about the language. My preference for the command line comes from my background of C/C++ programming on the command line.

Any help is most welcome,
Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁的新欢旧爱 2024-12-10 04:33:48

你到底想做什么?

如果您对 Java 不太熟悉,为什么不使用 Sphinx3 或 pocketsphinx,它们都是用 C 实现的呢?

http://cmusphinx.sourceforge.net/wiki/download/

另外,你可能会变得更好通过查看上述站点上的论坛或登录 IRC 频道 #cmusphinx 来对此主题进行回复

最后,您提到您的程序名称是“aligner”,这听起来像是您正在尝试进行强制对齐? sphinx3/sphinxtrain/pocketsphinx 软件包中已经有这方面的现有工具,可能值得您花时间检查它们。

What are you actually trying to do?

If you are not so familiar with Java, why not use Sphinx3 or pocketsphinx, both of which are implemented in C?

http://cmusphinx.sourceforge.net/wiki/download/

Also, you might get better responses on this topic by checking the forums on the above site, or checking in to the IRC channel #cmusphinx

Finally, you mention that your program name is 'aligner', which makes it sound like maybe you are trying to do forced alignment? There are already existing tools for this in the sphinx3/sphinxtrain/pocketsphinx packages and it would probably be worth your while to check them out.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文