Menu

Need for help with unimrcp + PocketSphinx

Help
2012-03-16
2012-09-22
  • mohamed bouraoui

    Hello ,

    Is there any baidy who has tried integrationf pocketSphinx to Asterisk unsing
    unimrcp .
    In fact I haved some probles .
    Can you help me please..

    Best regards.

     
  • Nickolay V. Shmyrev

    Is there any baidy who has tried integrationf pocketSphinx to Asterisk
    unsing unimrcp

    It works perfectly

    In fact I haved some probles . Can you help me please..

    In order to let us help you need to describe your problems in more details.

     
  • mohamed bouraoui

    In fact , I am installing unimrcp server and asterisk on the same machine , my
    configuration files are :

    *******unimrcpserver.xml**********

    <unimrcpserver xmlns:xsi="&lt;a class=" "="" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-klzzwxh:0014instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
    <properties> </properties></unimrcpserver>

    <ip>192.168.1.3</ip> -->

    <components> </components>

    <resource-factory>
    <resource id="user-content-speechsynth" enable="true">
    <resource id="user-content-speechrecog" enable="true">
    <resource id="user-content-recorder" enable="true">
    </resource></resource></resource></resource-factory>

    <sip-uas id="user-content-SIP-Agent-1" type="SofiaSIP"> </sip-uas>

    <sip-port>8070</sip-port>
    <sip-transport>udp,tcp</sip-transport>

    <ua-name>UniMRCP SofiaSIP</ua-name>
    <sdp-origin>UniMRCPServer</sdp-origin>

    <mrcpv2-uas id="user-content-MRCPv2-Agent-1"> </mrcpv2-uas>

    <mrcp-port>1544</mrcp-port>
    <max-connection-count>100</max-connection-count>
    <force-new-connection>false</force-new-connection>
    <rx-buffer-size>1024</rx-buffer-size>
    <tx-buffer-size>1024</tx-buffer-size>

    <media-engine id="user-content-Media-Engine-1">
    <realtime-rate>1</realtime-rate>
    </media-engine>

    <rtp-factory id="user-content-RTP-Factory-1"> </rtp-factory>

    <rtp-port-min>4000</rtp-port-min>
    <rtp-port-max>5000</rtp-port-max>

    <plugin-factory>
    <engine id="user-content-Cepstral-Swift-1" name="mrcpcepstral" enable="false">
    <engine id="user-content-PocketSphinx-1" name="mrcppocketsphinx" enable="false">
    <engine id="user-content-Flite-1" name="mrcpflite" enable="1">
    <engine id="user-content-Demo-Synth-1" name="demosynth" enable="true">
    <engine id="user-content-Demo-Recog-1" name="demorecog" enable="true">
    <engine id="user-content-Recorder-1" name="mrcprecorder" enable="true"> </engine></engine></engine></engine></engine></engine></plugin-factory>


    <settings> </settings>

    <rtp-settings id="user-content-RTP-Settings-1">
    <jitter-buffer>
    <playout-delay>50</playout-delay>
    <max-playout-delay>200</max-playout-delay>
    </jitter-buffer>
    <ptime>20</ptime>
    <codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-
    event/101/8000</codecs> </rtp-settings>

    <rtcp enable="false"> </rtcp>

    <rtcp-bye>1</rtcp-bye>

    <tx-interval>5000</tx-interval>

    <rx-resolution>1000</rx-resolution>


    <profiles> </profiles>

    <mrcpv2-profile id="user-content-uni2">
    <sip-uas>SIP-Agent-1</sip-uas>
    <mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
    <media-engine>Media-Engine-1</media-engine>
    <rtp-factory>RTP-Factory-1</rtp-factory>
    <rtp-settings>RTP-Settings-1</rtp-settings> </mrcpv2-profile>


    *******unimrcp.xml************

    <unimrcpclient xmlns:xsi="&lt;a class=" "="" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-klzzwxh:0160instance"
    xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
    version="1.0">
    <settings> </settings></unimrcpclient>

    <sip-settings id="user-content-UniMRCP-SIP-Settings"> </sip-settings>

    <server-port>8070</server-port>

    <rtsp-settings id="user-content-UniMRCP-RTSP-Settings"> </rtsp-settings>

    <server-port>1554</server-port>

    <resource-location>media</resource-location>
    <resource-map>
    <param name="speechsynth" value="speechsynthesizer">
    <param name="speechrecog" value="speechrecognizer">
    </resource-map>

    <profiles> </profiles>

    <mrcpv2-profile id="user-content-uni2">
    <sip-uac>SIP-Agent-1</sip-uac>
    <mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
    <media-engine>Media-Engine-1</media-engine>
    <rtp-factory>RTP-Factory-1</rtp-factory>
    <sip-settings>UniMRCP-SIP-Settings</sip-settings>
    <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv2-profile>

    <mrcpv1-profile id="user-content-uni1">
    <rtsp-uac>RTSP-Agent-1</rtsp-uac>
    <media-engine>Media-Engine-1</media-engine>
    <rtp-factory>RTP-Factory-1</rtp-factory>
    <rtsp-settings>UniMRCP-RTSP-Settings</rtsp-settings>
    <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv1-profile>


    *******unimrcpclient.xml********

    <unimrcpclient xmlns:xsi="&lt;a class=" "="" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-klzzwxh:0246instance"
    xsi:noNamespaceSchemaLocation="unimrcpclient.xsd"
    version="1.0">
    <properties> </properties></unimrcpclient>

    <ip>192.168.1.3</ip> -->

    <components> </components>

    <resource-factory>
    <resource id="user-content-speechsynth" enable="true">
    <resource id="user-content-speechrecog" enable="true">
    <resource id="user-content-recorder" enable="true">
    </resource></resource></resource></resource-factory>

    <sip-uac id="user-content-SIP-Agent-1" type="SofiaSIP"> </sip-uac>

    <sip-port>8070</sip-port>
    <sip-transport>udp</sip-transport>
    <ua-name>UniMRCP SofiaSIP</ua-name>
    <sdp-origin>UniMRCPClient</sdp-origin>

    <mrcpv2-uac id="user-content-MRCPv2-Agent-1">
    <max-connection-count>100</max-connection-count>
    <offer-new-connection>false</offer-new-connection>
    <rx-buffer-size>1024</rx-buffer-size>
    <tx-buffer-size>1024</tx-buffer-size> </mrcpv2-uac>

    <media-engine id="user-content-Media-Engine-1">
    <realtime-rate>1</realtime-rate>
    </media-engine>

    <rtp-factory id="user-content-RTP-Factory-1"> </rtp-factory>

    <rtp-port-min>4000</rtp-port-min>
    <rtp-port-max>5000</rtp-port-max>

    <settings> </settings>

    <sip-settings id="user-content-UniMRCP-SIP-Settings"> </sip-settings>

    <server-port>8070</server-port>

    <rtp-settings id="user-content-RTP-Settings-1">
    <jitter-buffer>
    <playout-delay>50</playout-delay>
    <max-playout-delay>200</max-playout-delay>
    </jitter-buffer>
    <ptime>20</ptime>
    <codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs> </rtp-settings>

    <rtcp enable="false"> </rtcp>

    <rtcp-bye>1</rtcp-bye>

    <tx-interval>5000</tx-interval>

    <rx-resolution>1000</rx-resolution>


    <profiles> </profiles>

    <mrcpv2-profile id="user-content-uni2">
    <sip-uac>SIP-Agent-1</sip-uac>
    <mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
    <media-engine>Media-Engine-1</media-engine>
    <rtp-factory>RTP-Factory-1</rtp-factory>
    <sip-settings>UniMRCP-SIP-Settings</sip-settings>
    <rtp-settings>RTP-Settings-1</rtp-settings>
    </mrcpv2-profile>


    ******mrcp.conf************

    default-asr-profile = speech-nuance5-mrcp2
    default-tts-profile = speech-nuance5-mrcp2
    ; UniMRCP logging level to appear in Asterisk logs. Options are:
    ; EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
    log-level = DEBUG
    max-connection-count = 100
    offer-new-connection = 1
    ; rx-buffer-size = 1024
    ; tx-buffer-size = 1024
    ; request-timeout = 60

    ; +++ MRCP settings +++
    version = 1
    ;
    ; +++ RTSP +++
    ; === RSTP settings ===
    server-ip = 192.168.1.3
    server-port = 4900
    ; force-destination = 1
    resource-location = media
    speechsynth = speechsynthesizer
    speechrecog = speechrecognizer
    ;
    ; +++ RTP +++
    ; === RTP factory ===
    ; rtp-ip = 0.0.0.0
    rtp-ip = 192.168.1.3
    ; rtp-ext-ip = auto
    rtp-port-min = 4000
    rtp-port-max = 5000
    ; === RTP settings ===
    ; --- Jitter buffer settings ---
    playout-delay = 50
    ; min-playout-delay = 20
    max-playout-delay = 200
    ; --- RTP settings ---
    ptime = 20
    codecs = PCMU PCMA L16/96/8000
    ; --- RTCP settings ---
    rtcp = 1
    rtcp-bye = 2
    rtcp-tx-interval = 5000
    rtcp-rx-resolution = 1000

    ; +++ MRCP settings +++
    version = 2
    ;
    ; +++ SIP +++
    ; === SIP settings ===
    server-ip = 192.168.1.3
    server-port = 8070
    ; server-username = test
    force-destination = 1
    ; === SIP agent ===
    ; client-ip = 0.0.0.0
    client-ip = 192.168.1.3
    ; client-ext-ip = auto
    client-port = 5093
    sip-transport = udp
    ; ua-name = Asterisk
    ; sdp-origin = Asterisk
    ;
    ; +++ RTP +++
    ; === RTP factory ===
    ; rtp-ip = 0.0.0.0
    rtp-ip = 192.168.1.3
    ; rtp-ext-ip = auto
    rtp-port-min = 4000
    rtp-port-max = 5000
    ; === RTP settings ===
    ; --- Jitter buffer settings ---
    playout-delay = 50
    ; min-playout-delay = 20
    max-playout-delay = 200
    ; --- RTP settings ---
    ptime = 20
    codecs = PCMU PCMA L16/96/8000
    ; --- RTCP settings ---
    rtcp = 1
    rtcp-bye = 2
    rtcp-tx-interval = 5000
    rtcp-rx-resolution = 1000

    But , the message on the asterisk cli that I have is ;

    ar 23 10:29:30] DEBUG: app_unimrcp.c:4175 unimrcp_log: Process Message
    DEBUG: app_unimrcp.c:4175 unimrcp_log: Add Media Context 0xa143bf0
    DEBUG: app_unimrcp.c:4175 unimrcp_log: Process Message
    DEBUG: app_unimrcp.c:4175 unimrcp_log: Media Termination Added 0xa143bf0 new @media-tm
    DEBUG: app_unimrcp.c:4175 unimrcp_log: Media Termination Added 0xa143bf0 new @rtp-tm
    DEBUG: app_unimrcp.c:4172 unimrcp_log: Send Offer 0xa143bf0 <new> to
    192.168.1.3:8070
    DEBUG: app_unimrcp.c:4172 unimrcp_log: Local SDP 0xa143bf0 <new>
    v=0
    o=Asterisk 0 0 IN IP4 192.168.1.3
    s=-
    c=IN IP4 192.168.1.3
    t=0 0
    m=application 9 TCP/MRCPv2 1
    a=setup:active
    a=connection:new
    a=resource:speechsynth
    a=cmid:1
    m=audio 4000 RTP/AVP 0 8 96
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:96 L16/8000
    a=recvonly
    a=ptime:20
    a=mid:1 </new></new>

    DEBUG: app_unimrcp.c:4175 unimrcp_log: Wait for Messages
    DEBUG: app_unimrcp.c:4172 unimrcp_log: Receive SIP Event Status 0 INVITE sent
    NOTICE: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0xa143bf0
    NOTICE: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0xa143bf0
    DEBUG: app_unimrcp.c:4172 unimrcp_log: Receive SIP Event Status 100 Trying
    DEBUG: app_unimrcp.c:4172 unimrcp_log: Receive SIP Event Status 100 Trying
    NOTICE: app_unimrcp.c:4169 unimrcp_log: SIP Call State
    NOTICE: app_unimrcp.c:4169 unimrcp_log: SIP Call State

    I don't have any voice synthesis using flite nor voice recognition using
    pocketSphinx .

    I would also to notify you that the unimrcpserver and client logs are emty
    !!!!!!!!!!!!!

    So please notify me if there is any error in the configuration files .

    Waiting for your answer ..

    Best regards .

     
  • Nickolay V. Shmyrev

    In your configuration file pocketsphinx module is disabled:

    <engine id="PocketSphinx-1" name="mrcppocketsphinx" enable="false"/>
     <engine id="Flite-1" name="mrcpflite" enable="1"/>
    

    You need to enable it.

     
  • mohamed bouraoui

    yes , I know because when voice recognition didn't work , I tried voice
    synthesis with Filte (ans it's enabled) but also the same probem ...

    So , is there any configuration error I would need to correct please ??

    Thanks for your Help.

     
  • Nickolay V. Shmyrev

    So , is there any configuration error I would need to correct please ??

    Yes, there is an error, you need to enable pocketsphinx module. You need to
    change false to true as I wrote above.

     

Log in to post a comment.