Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-23 Thread Jonathan H
Hi Dmitry and Tim (and everyone else with input into this thread) Just wanted to thank you all; with your guidance, I've managed to bolt something very clean and efficient together using Dmity and Tim's templates, piped into the ding-dong npm node package, which calls Google Speech API node

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-21 Thread Dmitriy Serov
Hello. A little sub from my dialplan: [sub-Read] exten => s,1,NoOp(Read)  same => n,Set(LOCAL(tmp_record_file)=/tmp/asterisk-in/${EPOCH})  same => n,Monitor(wav16,${tmp_record_file},o)  same => n,Read(tmp_ext,${ARG2},${ARG3},${ARG4},${ARG5},${ARG6})  same => n,StopMonitor()  same =>

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
On 20 January 2018 at 23:30, Tim S wrote: > I have seen this take over 2 seconds before on a sluggish machine. Thanks - my host uses SSD and everything seems pretty quick, but I'll give it a 1 second pause. > you'd need to pipe that to a Google Speech API tunnel. >

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Tim S
Also, be aware that by creating an audio file, you may need to insert a pause in your code before the file is: 1) written 2) flushed from cache to disk 3) registered as available to be opened by the OS I have seen this take over 2 seconds before on a sluggish machine. You can speed this up a bit

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Antony Stone
On Saturday 20 January 2018 at 18:45:49, Jonathan H wrote: > Oh, what a good idea! That's exactly the kind of lateral thinking I > was hoping someone would come up with. > > I thought it was called MixMonitor, and tried to wrap my head around > it but couldn't. MixMonitor is related, but

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
Oh, what a good idea! That's exactly the kind of lateral thinking I was hoping someone would come up with. I thought it was called MixMonitor, and tried to wrap my head around it but couldn't. I'll give this a go tomorrow and let you know what I come up with! Many thanks, Jonathan T On 20

Re: [asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Tim S
Just a quick and dirty thought, try the MONITOR application. Pseudo-code: Anchor-point PLAYBACK ("press or say") MONITOR (use the split audio files mode, not the mixed - this way you can roughly separate which side did the "talking") READ (audio file "1 to 5", try to grab one digit) STOPMONITOR

[asterisk-users] Can anyone help with a quick app_record.c module improvement and can explain over-riding modules?

2018-01-20 Thread Jonathan H
Hello, I want to start recording with a prompt of "press or say 1 to 5". If no DMTF is pressed, I want to send the recording to Google Speech to get the number back (got that part working already). If any dtmf key is pressed while Application_Record is running with option y, then the recording