2017-01-04 15 views
0

음성 인식을 위해 pocketsphinx와 함께 freeswitch를 사용하고 있습니다. 문법 파일에서 영어를 사용할 때 잘 작동하지만 지금은 프랑스어를 사용하고 싶습니다. 이미 https://sourceforge.net/projects/cmusphinx/files/Acoustic%20and%20Language%20Models/French/에서 프랑스어 모델을 다운로드 한 다음 추출했습니다. freeswitch/문법/모델/FR에서 cmusphinx-FR-PTM-5.2.tar.gz 파일/및 freeswitch/문법에서 fr.dict/freeswitch pocketsphinx : 설치 모델 언어

이 conf의/autoload_configs/pocketsphinx.conf.xml :

<configuration name="pocketsphinx.conf" description="PocketSphinx ASR Configuration"> 
    <settings> 
    <param name="threshold" value="400"/> 
    <param name="silence-hits" value="25"/> 
    <param name="listen-hits" value="1"/> 
    <param name="auto-reload" value="true"/> 
    <!--<param name="language-weight" value="1"/>--> 
    <param name="narrowband-model" value="fr"/> 
    <!--<param name="wideband-model" value="wsj1"/>--> 
    <param name="dictionary" value="fr.dict"/> 
    </settings> 
</configuration> 

문제는 문법 파일을로드하려고 할 때 freeswitch가 차단된다는 것입니다. 여기에 로그 :

break=on-false 
    Dialplan: sofia/internal/[email protected] parsing [default->vidson_ivr] continue=false 
    Dialplan: sofia/internal/[email protected] Regex (PASS) [vidson_ivr] destination_number(vidson) =~ /^vidson$/ break=on-false 
    Dialplan: sofia/internal/[email protected] Action javascript(vidson.js) 
    2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:286 (sofia/internal/[email protected]) State Change CS_ROUTING -> CS_EXECUTE 
    2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:643 (sofia/internal/[email protected]) State ROUTING going to sleep 
    2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/[email protected]) Running State Change CS_EXECUTE (Cur 1 Tot 1) 
    2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/[email protected]) State EXECUTE 
    2017-01-03 18:36:39.106882 [DEBUG] mod_sofia.c:200 sofia/internal/[email protected] SOFIA EXECUTE 
    2017-01-03 18:36:39.106882 [DEBUG] switch_core_state_machine.c:328 sofia/internal/[email protected] Standard EXECUTE 
    EXECUTE sofia/internal/[email protected] set(open=true) 
    2017-01-03 18:36:39.106882 [DEBUG] mod_dptools.c:1562 SET sofia/internal/[email protected] [open]=[true] 
    EXECUTE sofia/internal/[email protected] hash(insert/164.132.197.182-spymap/abdofariss/31da341e-f146-4239-94f8-1966bbb3c96d) 
    EXECUTE sofia/internal/[email protected] hash(insert/164.132.197.182-last_dial/abdofariss/vidson) 
    EXECUTE sofia/internal/[email protected] hash(insert/164.132.197.182-last_dial/global/31da341e-f146-4239-94f8-1966bbb3c96d) 
    EXECUTE sofia/internal/[email protected] export(RFC2822_DATE=Tue, 03 Jan 2017 18:36:39 +0100) 
    2017-01-03 18:36:39.106882 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Tue, 03 Jan 2017 18:36:39 +0100] 
    EXECUTE sofia/internal/[email protected] javascript(vidson.js) 
    2017-01-03 18:36:39.126878 [DEBUG] fsglobal.cpp:524 Loading XML 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[opus:116:48000:20:0:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[G722:9:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMU:0:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [GSM:3:8000:20:13200:1]/[PCMA:8:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[opus:116:48000:20:0:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[G722:9:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMU:0:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [speex:110:8000:20:0:1]/[PCMA:8:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[opus:116:48000:20:0:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[G722:9:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMU:0:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [iLBC:97:8000:30:0:1]/[PCMA:8:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4843 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4843 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4788 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:4704 Set telephone-event payload to [email protected] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:3385 Set Codec sofia/internal/[email protected] PCMA/8000 20 ms 160 samples 64000 bits 1 channels 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_codec.c:111 sofia/internal/[email protected] Original read codec set to PCMA:8 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:5047 Set telephone-event payload to [email protected] 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:5106 sofia/internal/[email protected] Set 2833 dtmf send payload to 101 recv payload to 101 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7653 AUDIO RTP [sofia/internal/[email protected]] 164.132.197.182 port 30020 -> 192.168.0.1 port 48260 codec: 8 ms: 20 
    2017-01-03 18:36:39.126878 [DEBUG] switch_rtp.c:3888 Starting timer [soft] 160 bytes per 20ms 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7961 sofia/internal/[email protected] Set 2833 dtmf send payload to 101 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7968 sofia/internal/[email protected] Set 2833 dtmf receive payload to 101 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7991 sofia/internal/[email protected] Set rtp dtmf delay to 40 
    2017-01-03 18:36:39.126878 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/[email protected]! 
    2017-01-03 18:36:39.126878 [DEBUG] switch_channel.c:3473 (sofia/internal/[email protected]) Callstate Change RINGING -> EARLY 
    2017-01-03 18:36:39.126878 [DEBUG] switch_core_media.c:7636 Audio params are unchanged for sofia/internal/[email protected] 
    2017-01-03 18:36:39.126878 [DEBUG] mod_sofia.c:826 Local SDP sofia/internal/[email protected]: 
    v=0 
    o=FreeSWITCH 1483434979 1483434980 IN IP4 164.132.197.182 
    s=FreeSWITCH 
    c=IN IP4 164.132.197.182 
    t=0 0 
    m=audio 30020 RTP/AVP 8 101 
    a=rtpmap:8 PCMA/8000 
    a=rtpmap:101 telephone-event/8000 
    a=fmtp:101 0-16 
    a=ptime:20 
    a=sendrecv 

    2017-01-03 18:36:39.126878 [DEBUG] sofia.c:7116 Channel sofia/internal/[email protected] entering state [completed][200] 
    2017-01-03 18:36:39.126878 [NOTICE] fssession.cpp:1168 Channel [sofia/internal/[email protected]] has been answered 
    2017-01-03 18:36:39.126878 [DEBUG] switch_channel.c:3772 (sofia/internal/[email protected]) Callstate Change EARLY -> ACTIVE 
    EXECUTE sofia/internal/[email protected] set(tts_engine=cepstral) 
    2017-01-03 18:36:39.126878 [DEBUG] mod_dptools.c:1562 SET sofia/internal/[email protected] [tts_engine]=[cepstral] 
    EXECUTE sofia/internal/[email protected] set(tts_voice=isabel) 
    2017-01-03 18:36:39.126878 [DEBUG] mod_dptools.c:1562 SET sofia/internal/[email protected] [tts_voice]=[isabel] 
    2017-01-03 18:36:39.126878 [DEBUG] fssession.cpp:980 Raw Codec Activation Success [email protected] 1 channel 20ms 
    2017-01-03 18:36:39.126878 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Bienvenue sur la prise de rendez-vous téléphonique de Vidson-Medical 
    2017-01-03 18:36:39.246877 [DEBUG] sofia.c:7116 Channel sofia/internal/[email protected] entering state [ready][200] 
    2017-01-03 18:36:39.986880 [INFO] switch_rtp.c:6957 Auto Changing audio port from 192.168.0.1:48260 to ip:48260 
    2017-01-03 18:36:44.566901 [DEBUG] switch_rtp.c:7233 RTP RECV DTMF 1:960 
    2017-01-03 18:36:44.566901 [INFO] switch_channel.c:515 RECV DTMF 1:960 
    2017-01-03 18:36:44.566901 [DEBUG] switch_ivr_play_say.c:2871 done speaking text 
    2017-01-03 18:36:44.666896 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Merci de sélectionner une action. 
    2017-01-03 18:36:44.666896 [DEBUG] switch_ivr_play_say.c:2871 done speaking text 
    2017-01-03 18:36:44.766896 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour prendre un rendez-vous, tapez 1 
    2017-01-03 18:36:44.766896 [DEBUG] switch_ivr_play_say.c:2871 done speaking text 
    2017-01-03 18:36:44.866885 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour annuler un rendez-vous, tapez 2 
    2017-01-03 18:36:44.866885 [DEBUG] switch_ivr_play_say.c:2871 done speaking text 
    2017-01-03 18:36:44.966881 [DEBUG] switch_ivr_play_say.c:2693 Speaking text: Pour joindre le secrétariat, tapez 3 
    2017-01-03 18:36:44.966881 [DEBUG] switch_ivr_play_say.c:2871 done speaking text 

모델을 설치하는 데 도움을 주시겠습니까?

+0

이 모델은 광대역이므로 어쨌든 협 대역 오디오에는 사용할 수 없습니다. –

+0

안녕하세요, 저는 오디오 파일을 사용하고 있지 않습니다. 저는 ives 메뉴를 만들기 위해 freeswitch를 사용하고 있습니다. 그래서 voip을 통해 서버에 전화를 걸면 내 말은 pocketsphinx로 감지 될 것이고, 영어로 잘 작동하고 있습니다. 설치용 포켓 문자를 도울 수 있습니까? 프랑스 같은 다른 언어로? 감사 –

답변

0

전화 품질을 위해 8khz model을 다운로드해야합니다. 오늘 방금 업로드했습니다.

매우 크지 않으므로 매우 정확할 것으로 기대하지 마십시오.

영어 파일처럼 모델 파일을 폴더에 올바르게 넣어야합니다. 그 때 그것은 작동 할 것이다.

최신 pocketsphinx를 사용하고 있는지 확인하십시오.