LatticeDemo.java를 시도했습니다. 그리고 예제 결과에 표시된 결과를 얻을 수 있습니다. 이 예에서는 음성 데이터 (10001-90210-01803.wav)에 "AudioFileDataSource"를 사용하고 있습니다. StreamDataSource를 사용하여이 음성 데이터를 다른 방식으로 인식하려고합니다.streamDataSource 사용
그러나 나는 다른 결과를 얻습니다. 나는 어떤 생각을 듣고 싶다.
다음 내가 수행 한 단계입니다 :
GET 바이트의 데이터를 10001-90210-01803.wav에서 다음 코드에 의해
File f = new File(file); ByteArrayOutputStream out = new ByteArrayOutputStream(); BufferedInputStream in; try { in = new BufferedInputStream(new FileInputStream(f)); return ByteStreams.toByteArray(in); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }
그런 다음, 방금 전화, 바이트의 데이터를 입력 다음과 같이 ByteArrayInputStream에 "data"를 입력하십시오.
StreamDataSource dataSource = (StreamDataSource) cm.lookup ("streamDataSource"); ByteArrayInputStream st = 새 ByteArrayInputStream (데이터); dataSource.setInputStream (st, "Main Stream");
사실 "setInputStream"기능을 사용할 때 두 번째 인수 (즉, "Main Stream")는 특별한 의미가 있습니까? 나는 왜이 주장이 필요한지 알 수 없다. "=
< 요소 이름 ="streamDataSource "TYPE ="edu.cmu.sphinx.frontend.util.StreamDataSource "> < 속성 명 ="sampleRate "값 :
streamDataSource의 구성은 다음과 같다 16000 "/ > < 속성 명 ="bigendianData "값 ="거짓 "/ > </컴포넌트 >
는 출력이다
Loading...
17:48:01.941 WARNING dictionary Missing word: <unk>
17:48:02.543 WARNING dictionary Missing word: <unk>
<s> i. </s>
<s> i. <sil> </s>
<s> i. a. </s>
<s> i. a </s>
<s> i </s>
<s> i a </s>
<s> i <sil> </s>
<s> i a. </s>
<s> high a </s>
<s> i </s>
<s> a i </s>
<s> a i. </s>
<s> i i </s>
<s> i i. </s>
<s> i. </s>
<s> i. i. </s>
<s> high </s>
<s> higher </s>
<s> tight </s>
<s> right </s>
<s> wright </s>
I heard: i
안부
사실
감사합니다. Nikolay. "bigendianData"를 수정 한 후에 나는 좋은 결과를 얻을 수있었습니다. 그러나 첫 번째 문장 인 "나는 0을 0으로합니다."라고 말했습니다. 그래서,이 경우 나는 다른 해석을 얻지 못했습니다. "나는 들었습니다 : 분석가는 오오"였습니다. "나는 들었습니다. 그러나, 어쨌든,이 결과는 나에게 좋게 들립니다. 감사합니다. – user2533493
모든 음성 목록을 얻을 수 있습니다. 그건 내 프로그램의 문제 였어. 감사합니다 – user2533493
그러나 마지막 문장은 "나는 들었습니다 : 시설은 3 명이 올랐습니다"라는 문장이 다릅니다. – user2533493