Comments (11)
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.
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.
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.
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.
Of course. I kind of feel dumb for asking now. Thanks for the quick replies.
from asterisk-speech-recog.
Two more questions:
- 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?
- 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.
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.
Okay, I have done some playing and it is mostly user error:
- I had a some stray spaces near the commas, Asterisk can't handle spaces between arguments
- I played more with silence detection, and even putting my SIP phone on mute I can't trigger a silence timeout.
- 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.
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.
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.
It seems like its an asterisk bug that should be reported upstream.
from asterisk-speech-recog.
Related Issues (20)
- some.flac isuue
- Problems whit google API credencials HOT 4
- API is reading but it wont recognize voice. Using cloud Speech HOT 2
- still working up to now? HOT 1
- Unable to get recognition data HOT 3
- Output from Google. HOT 1
- the API is not working, it is not waiting for the voice to be recorded
- variable silence HOT 1
- Sln file availability after recording HOT 4
- Cannot recognize
- speech-recog.agi, Some unexpected error. Just says -1
- Google Streaming ASR HOT 1
- Problem when using $abs_timeout or [rtimeout] HOT 3
- Help with AGI
- Allow caller to interupt previous command and start recognition?
- Exits without any pause for the user to speak HOT 4
- Problems with API usage HOT 1
- store location
- Is this works with IBM Watson
- Is new google api supported? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asterisk-speech-recog.