【问题标题】:CMU Sphinx and time indexed wordsCMU Sphinx 和时间索引词
【发布时间】:2019-02-10 12:04:29
【问题描述】:



我已经运行了 Pocketsphinx Python 的示例,现在我面临的问题是我想运行一个 60 秒的 wav 文件以进行英语语音识别并希望作为输出
- 英文翻译和
- 在哪一秒提到了每个单词。

现在,我不知道从哪里开始做一些研究以获得所需的输出。谁能指出我正确的方向??

【问题讨论】:

    标签: speech-to-text cmusphinx


    【解决方案1】:

    好的,像 Kaldi 这样的开源工具会自动提供以下功能: https://americanarchivepb.wordpress.com/2017/12/04/dockerized-kaldi-speech-to-text-tool/

    【讨论】:

    • 问题是关于pocketsphinx,而不是Kaldi。
    【解决方案2】:

    您需要forced alignment 的认可。这是 Pocketsphinx 的example

    pocketsphinx_continuous
        -infile with.wav
        -jsgf with-word.jsgf
        -dict words.dict
        -backtrace yes
        -fsgusefiller no
        -bestpath no 
      2>&1 > with-word.txt
    

    输出:

    ==> with-word.txt <==
    INFO: fsg_search.c(869): fsg 0.05 CPU 0.051 xRT
    INFO: fsg_search.c(871): fsg 0.09 wall 0.084 xRT
    INFO: pocketsphinx.c(1171): sil with sil (-2607)
    word                 start end   pprob ascr       lscr       lback
    sil                  3     77    1.000 -1602      0          1
    with                 78    102   1.000 -845       0          1
    sil                  103   107   1.000 -160       0          1
    INFO: fsg_search.c(265): TOTAL fsg 0.05 CPU 0.051 xRT
    INFO: fsg_search.c(268): TOTAL fsg 0.09 wall 0.085 xRT
    sil with sil
    

    对于 CMU Sphinx 4,您需要 Sphinx API 中的 SpeechAligner 类。 Here 你会发现一个简单的对齐工具的实现。

    ./align.sh sample.wav sample.txt 2>/dev/null
    

    输出:

    "it's","IH T S","false","0.0","170","200"
    "a","AH","false","-5540774.0","200","390"
    "crowd","K R AW D","false","-1.13934288E8","850","1300"
    "in","IH N","false","-1.95127088E8","1300","1470"
    "two","T UW","false","-2.23176048E8","1470","1700"
    "distinct","D IH S T IH NG K T","false","-2.6345264E8","1700","2230"
    "ways","W EY Z","false","-3.58427808E8","2230","2730"
    "the","DH AH","false","-4.72551168E8","2920","3100"
    "fruit","F R UW T","false","-5.24233504E8","3220","3530"
    "of","AH V","false","-5.79971456E8","3530","3640"
    "a","AH","false","-5.99515456E8","3640","3760"
    "figg","F IH G","false","-6.2017152E8","3760","4060"
    "tree","T R IY","false","-6.72126656E8","4060","4490"
    "is","IH Z","false","-7.4763744E8","4490","4570"
    "apple","AE P AH L","false","-7.73581184E8","4630","5040"
    "shaped","SH EY P T","false","-8.44424704E8","5040","5340"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      • 2012-08-19
      相关资源
      最近更新 更多