Giter VIP home page Giter VIP logo

Comments (11)

zaf avatar zaf commented on July 17, 2024

Hello Lorne,
The dialpan is right, the problem comes from the silence detection in
asterisk. Old phones or bad quality analog lines create
enough static noise to make asterisk fail in the detection of silence,
so the script keeps recording till you manually terminate it by
dialing #. To fix this we will have to patch asterisk itself and
change the silence threshold in the detection routines. Its not hard
to do this but also not very practical.

from asterisk-speech-recog.

zaf avatar zaf commented on July 17, 2024

In case you are using an analog phone with dahdi hardware try and see if playing with the rxgain value can improve silence detection.

from asterisk-speech-recog.

lgaetz avatar lgaetz commented on July 17, 2024

At the moment I am just using a SIP phone for testing. Adjustments to rx/tx gains may fix the silence detection issues but would probably impact actual conversations negatively, but I will give it a try at some point. If dtmf and silence detection are out, is there anything else I can do with a rotary phone and still use this script?

from asterisk-speech-recog.

zaf avatar zaf commented on July 17, 2024

We can have a limit on the recording duration.
This option is already available in the script:
agi(speech-recog.agi,[lang],[timeout])
will record for 'timeout' seconds and then return the detected utterance.

from asterisk-speech-recog.

lgaetz avatar lgaetz commented on July 17, 2024

Of course. I kind of feel dumb for asking now. Thanks for the quick replies.

from asterisk-speech-recog.

lgaetz avatar lgaetz commented on July 17, 2024

Two more questions:

  1. From your usage notes, it looks to me like the timout value is meant to control the number of seconds of silence before it times out, not the absolute number of seconds. Can you clarify?
  2. I have tried passing multiple arguments to the script and I don't see any different behavior. If I wanted to do speech recognition using US english, 5 second timeout, an interrupt key 1 and nobeep, would the dialplan line look like this:
    exten => 777,n,agi(speech-recog.agi,en-US,5,1,nobeep)

from asterisk-speech-recog.

zaf avatar zaf commented on July 17, 2024

You are right, the timeout option now controls the silence duration, recording timeout was the old behavior that is not available anymore. Sorry for that, its my turn to feel dumb :P

In your second question, you mean that dialing 1 doesn't terminate the recording? (the syntax is correct as far as I can tell, expect the 'nobeep' option that must be capitalized)

from asterisk-speech-recog.

lgaetz avatar lgaetz commented on July 17, 2024

Okay, I have done some playing and it is mostly user error:

  1. I had a some stray spaces near the commas, Asterisk can't handle spaces between arguments
  2. I played more with silence detection, and even putting my SIP phone on mute I can't trigger a silence timeout.
  3. NOBEEP does work when it is all caps.

Given the issues around Asterisk and silence detection, I suggest that you bring back the absolute timeout originally used, perhaps by using a negative, i.e. positive timout values are silence detection and negative timeout values are absolute, with zero being used to disable?

from asterisk-speech-recog.

zaf avatar zaf commented on July 17, 2024

Seems like a sane thing to do. I ll check it as soon as I find some free time and push some new code here.

from asterisk-speech-recog.

lgaetz avatar lgaetz commented on July 17, 2024

I scrubbed my test server running FreePBX 2.10 and Asterisk 1.8.something-CERT and replaced with FreePBX 2.10 running on Asterisk 1.8.12.0. Silence detection is working fine now.

from asterisk-speech-recog.

zaf avatar zaf commented on July 17, 2024

It seems like its an asterisk bug that should be reported upstream.

from asterisk-speech-recog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.