1
음성 인식의 문제에 빠져 있습니다. 그것은 다른 파일과 다른 오류를 제공하고 있습니다.0x76bb10f8에있는 '가설 *'유형의 Swig 개체의 프록시>
이내 코드는 내가 두 wav 파일 내가 arecord로 녹화 한 1. 파일 'wav.wav'기간 2 초 시도 여기
#!/usr/bin/python
import sys, wave, os
import pocketsphinx as ps
from pocketsphinx.pocketsphinx import *
from sphinxbase.sphinxbase import *
hmdir = "/usr/local/share/pocketsphinx/model/en-us/en-us"
lmd = "/usr/local/share/pocketsphinx/model/en-us/en-us.lm.dmp"
dictd = "/usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict"
wavfile = "./look.wav"
wavFile = file(wavfile,'rb')
config = Decoder.default_config()
config.set_string('-hmm', hmdir)
config.set_string('-lm', lmd)
config.set_string('-dict', dictd)
speechRec = ps.Decoder(config)
speechRec.decode_raw(wavFile)
result = speechRec.hyp()
print result
입니다 ... 도와주세요, 나는 "고 말했다 안녕 안녕". 2. pico2wave 단어의 출력을 기록한 'look.wav'파일은 "Look Dave"입니다.
입력 모두의 출력은
INFO: ngram_search_fwdflat.c(302): Utterance vocabulary contains 106 words
INFO: ngram_search_fwdflat.c(945): 1144 words recognized (15/fr)
INFO: ngram_search_fwdflat.c(947): 74827 senones evaluated (1011/fr)
INFO: ngram_search_fwdflat.c(949): 95911 channels searched (1296/fr)
INFO: ngram_search_fwdflat.c(951): 5123 words searched (69/fr)
INFO: ngram_search_fwdflat.c(954): 3818 word transitions (51/fr)
INFO: ngram_search_fwdflat.c(957): fwdflat 0.60 CPU 0.811 xRT
INFO: ngram_search_fwdflat.c(960): fwdflat 0.61 wall 0.819 xRT
INFO: ngram_search.c(1252): lattice start node <s>.0 end node </s>.54
INFO: ngram_search.c(1278): Eliminated 1 nodes before end node
INFO: ngram_search.c(1383): Lattice has 215 nodes, 603 links
INFO: ps_lattice.c(1380): Bestpath score: -3824
INFO: ps_lattice.c(1384): Normalizer P(O) = alpha(</s>:54:72) = -264317
INFO: ps_lattice.c(1441): Joint P(O,S) = -303746 P(S|O) = -39429
INFO: ngram_search.c(874): bestpath 0.01 CPU 0.014 xRT
INFO: ngram_search.c(877): bestpath 0.01 wall 0.011 xRT
<pocketsphinx.pocketsphinx.Hypothesis; proxy of <Swig Object of type 'Hypothesis *' at 0x76bb10f8> >
INFO: ngram_search_fwdtree.c(432): TOTAL fwdtree 2.10 CPU 2.877 xRT
INFO: ngram_search_fwdtree.c(435): TOTAL fwdtree 2.21 wall 3.031 xRT
INFO: ngram_search_fwdflat.c(176): TOTAL fwdflat 0.60 CPU 0.822 xRT
INFO: ngram_search_fwdflat.c(179): TOTAL fwdflat 0.61 wall 0.830 xRT
INFO: ngram_search.c(303): TOTAL bestpath 0.01 CPU 0.014 xRT
INFO: ngram_search.c(306): TOTAL bestpath 0.01 wall 0.011 xRT
문자열을 인쇄하려면'decoder.hyp(). hypstr'을 사용해야합니다. 'arecord -f S16_LE -r 16000> wav.wav' –
오래된 코드도 사용하는 것처럼 보입니다. 최신 pocketsphinx-python과 데모가 있습니다 : https://github.com/cmusphinx/pocketsphinx-python –
한 번에 한 가지 질문을하셔야합니다. –