Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-10 Thread Joshua Colp
On Sun, Dec 10, 2017, at 05:51 PM, Jonathan H wrote:
> Hang on, all of the fiddling in this thread seems remarkably
> over-complicating what should be an incredibly simple task.
> 
> We know that a DTMF keypress interrupted the recording. We also know
> that app_record.c knows which keypress it was from
> 
> * \param dtmf_integer the integer value of the DTMF key received
> 
> as in
> 
> static enum dtmf_response record_dtmf_response(struct ast_channel
> *chan, struct ast_flags *flags, int dtmf_integer, int terminator)
> 
> For reasons which have me scratching my head, app_record turns a
> useful DTMF value into a rather meaningless "DTMF" in the
> RECORD_STATUS variable.

When originally added it was only possible to terminate based on a
termination DTMF, so you'd know which DTMF key was used because no other
DTMF would stop. Afterwards a community member contributed a change[1]
to add an option to allow any DTMF key to terminate it, but the dialplan
variable stuff was not extended to make the knowledge of which DTMF was
used available.
 
> But SOMETHING must be floating around in Asterisk for app_record.c to
> know what number was pushed. If I'm using RFC2833, is there ANY way of
> getting that last keypress.
> 
> In other words: "The user pressed a number, recording stopped, now
> what was that number?" - WITHOUT rewriting and recompiling a core
> application or doing any complex workaround?

Within the code f->subclass.integer is where the DTMF digit is. You'd
need to make a code change to set another dialplan variable which
contains it. 

[1] https://issues.asterisk.org/jira/browse/ASTERISK-14380

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-10 Thread Jonathan H
Hang on, all of the fiddling in this thread seems remarkably
over-complicating what should be an incredibly simple task.

We know that a DTMF keypress interrupted the recording. We also know
that app_record.c knows which keypress it was from

* \param dtmf_integer the integer value of the DTMF key received

as in

static enum dtmf_response record_dtmf_response(struct ast_channel
*chan, struct ast_flags *flags, int dtmf_integer, int terminator)

For reasons which have me scratching my head, app_record turns a
useful DTMF value into a rather meaningless "DTMF" in the
RECORD_STATUS variable.

But SOMETHING must be floating around in Asterisk for app_record.c to
know what number was pushed. If I'm using RFC2833, is there ANY way of
getting that last keypress.

In other words: "The user pressed a number, recording stopped, now
what was that number?" - WITHOUT rewriting and recompiling a core
application or doing any complex workaround?

Thanks

On 6 December 2017 at 23:25, Jonathan H  wrote:
> Thanks for your responses - it looks like I have the following
> options, in order of ease:
>
> 1: Modify and recompile app_record.c
>
> Change line 471
> https://github.com/asterisk/asterisk/blob/master/apps/app_record.c#L471
> from
>status_response = "DTMF";
> to
>status_response = dtmf_integer;
>
> Pro: Free, easy
> Con: Have to remember to edit module each time a new Asterisk update comes out
>
> 2: Use the Jean Aunis "mix ARI and AGI" trick.
> Pro: Doesn't need recompiling on each Asterisk release.
> Con: A bit of fiddling and requires an ARI library.
>
> 3: Pay $50 for uniMRCP module
> Pro: Does what I need to do
> Con: $50 per channel. Requires account. Lots of setup to basically add
> DTMF to the speech recognition I'm already doing.
>
> Yes? No? None of the above? Other?!
>
> On 6 December 2017 at 14:54, Jurijs Ivolga  wrote:
>> Hi,
>>
>> Please check code of it. It listens for # and it is quite easy to add all
>> other keys 1-9 and etc
>>
>> Then change code accordingly so script returns value of key.
>>
>> As far as I remember it wasn't hard.
>>
>> With kind regards,
>>
>>
>> Jurijs
>>
>> On Wed, Dec 6, 2017 at 4:50 PM, Jonathan H  wrote:
>>>
>>> Thanks Jurijs,
>>>
>>> Yes, in fact I'm already using that, and it works fine. The problem
>>> here is that I cannot find a way of recording speech AND listening for
>>> a DTMF digit being pressed as an alternative.
>>>
>>> That's where the problem lies.
>>>
>>> J.
>>>
>>> --
>>> _
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> Check out the new Asterisk community forum at:
>>> https://community.asterisk.org/
>>>
>>> New to Asterisk? Start here:
>>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jonathan H
Thanks for your responses - it looks like I have the following
options, in order of ease:

1: Modify and recompile app_record.c

Change line 471
https://github.com/asterisk/asterisk/blob/master/apps/app_record.c#L471
from
   status_response = "DTMF";
to
   status_response = dtmf_integer;

Pro: Free, easy
Con: Have to remember to edit module each time a new Asterisk update comes out

2: Use the Jean Aunis "mix ARI and AGI" trick.
Pro: Doesn't need recompiling on each Asterisk release.
Con: A bit of fiddling and requires an ARI library.

3: Pay $50 for uniMRCP module
Pro: Does what I need to do
Con: $50 per channel. Requires account. Lots of setup to basically add
DTMF to the speech recognition I'm already doing.

Yes? No? None of the above? Other?!

On 6 December 2017 at 14:54, Jurijs Ivolga  wrote:
> Hi,
>
> Please check code of it. It listens for # and it is quite easy to add all
> other keys 1-9 and etc
>
> Then change code accordingly so script returns value of key.
>
> As far as I remember it wasn't hard.
>
> With kind regards,
>
>
> Jurijs
>
> On Wed, Dec 6, 2017 at 4:50 PM, Jonathan H  wrote:
>>
>> Thanks Jurijs,
>>
>> Yes, in fact I'm already using that, and it works fine. The problem
>> here is that I cannot find a way of recording speech AND listening for
>> a DTMF digit being pressed as an alternative.
>>
>> That's where the problem lies.
>>
>> J.
>>
>> --
>> _
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> Check out the new Asterisk community forum at:
>> https://community.asterisk.org/
>>
>> New to Asterisk? Start here:
>>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Dan Cropp
UniMRCP with one of the various speech recognition providers they support 
definitely works for this.
Specify multiple grammars in the MRCP call.  One for text to listen for.  
Another for the DTMFs to listen for.
The results will indicate which grammar and what was detected.

The combination of voice and/or DTMFs is exactly what speech recognition has 
been designed for.  I am very pleased with UniMRCP and the support they have 
given us.


From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jurijs Ivolga
Sent: Wednesday, December 06, 2017 8:44 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Simple speech recognition for driving IVR - 
"press or say one".

Hi,
I was able to achieve this using:

Jurijs

On Wed, Dec 6, 2017 at 4:33 PM, Jonathan H 
mailto:lardconce...@gmail.com>> wrote:
Briefly: I want to be able to have "press or say (number)", with
Asterisk listening for a spoken number, but accepting a DTMF digit,
too.

I'm posting everything I found so far, here, partly to show working,
but also in case anyone else finds it useful. So, moving on

This looked hopeful for a moment until I realised that it doesn't do DTMF:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_SpeechBackground

So then there's
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_Record,
which can terminate on any DTMF key with "y", but according to the
docs, "RECORD_STATUS" only sets a flag of "DTMF" (A terminating DTMF
was received ('#' or '*', depending upon option 't')).
So, I don't get to know which key was pressed via that method, either.

There's very little information I can find about the built-in
functions for speech recognition.
https://wiki.asterisk.org/wiki/display/AST/Speech+Recognition+API
doesn't actually explain how to integrate the actual speech engines.

In this previous forum post,
https://community.asterisk.org/t/asterisk-15-jack-streams-speech-recognition-so-many-questions/72108/2
, jcolp explained that most people don't use the speech interface
anyway, because
"Asterisk modules are written in C, and it’s more difficult to do
things in that fashion. Using the Record and ship it off using Python,
etc, is just easier and gets the job done for a lot of people to where
they find it acceptable.
So, AGI it is! But I'm still stuck on how I record for speech AND get
a DTMF if it was dialled.

Regarding speech in general, even "Asterisk - The Definitive Guide" just says:

"Asterisk does not have speech recognition built in, but there are
many third-party speech
recognition packages that integrate with Asterisk. Much of that is
outside of the scope
of this book, as those applications are external to Asterisk" - helpful!

The speech-rec mailing list at
http://lists.digium.com/pipermail/asterisk-speech-rec/ hasn't been
posted to since 2013

Someone else asked about speech recognition and unimrcp in this post:
http://lists.digium.com/pipermail/asterisk-users/2017-February/290875.html

uniMCRP https://mojolingo.com/blog/2015/speech-rec-asterisk-get-started/
http://www.unimrcp.org/manuals/html/AsteriskManual.html#_Toc424230605
This has a Google Speech Recogniser plugin, but it's $50 per channel
http://www.unimrcp.org/gsr

*Reasons to use Lex over Google TTS*
• Has just been released in eu-west-1:
https://forums.aws.amazon.com/ann.jspa?annID=5186
• Supports 8KHz telepony https://forums.aws.amazon.com/ann.jspa?annID=4775
• Is in the core AWS SDK
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/LexRuntime.html
• Has a number slot type:
http://docs.aws.amazon.com/lex/latest/dg/built-in-slot-number.html
 - this means no accidental recognition of "won", "one" or "juan" instead of 1!

The pricing is definitely right: "The cost for 1,000 speech requests
would be $4.00, and 1,000 text requests would cost $0.75. From the
date you get started with Amazon Lex, you can process up to 10,000
text requests and 5,000 speech requests per month for free for the
first year".

Amazon Transcribe looks promising too, but is only available for
developer invitation at this time:
https://aws.amazon.com/transcribe/ https://aws.amazon.com/transcribe/pricing/

But all I need now is the quickest, simplest way to send Lex a short
8KHz file and get a single digit back, as quickly and reliably as
possible.

Before I travel too far down this road, can someone point me in the
right direction and possibly steer me away from the wrong path?!

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Sta

Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jean Aunis

Hello,

Maybe you can do this by mixing your current code with an ARI 
application. I mean :


- just before entering the speech recognition AGI, enter your ARI 
application


- in the application, subscribe to the channel's events, setup DTMF 
event handlers, and call "continueInDialpan"


- then enter the speech recognition AGI as before

Regards

Jean Aunis


Le 06/12/2017 à 15:50, Jonathan H a écrit :

Thanks Jurijs,

Yes, in fact I'm already using that, and it works fine. The problem
here is that I cannot find a way of recording speech AND listening for
a DTMF digit being pressed as an alternative.

That's where the problem lies.

J.




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jurijs Ivolga
Hi,

Please check code of it. It listens for # and it is quite easy to add all
other keys 1-9 and etc

Then change code accordingly so script returns value of key.

As far as I remember it wasn't hard.

With kind regards,


Jurijs

On Wed, Dec 6, 2017 at 4:50 PM, Jonathan H  wrote:

> Thanks Jurijs,
>
> Yes, in fact I'm already using that, and it works fine. The problem
> here is that I cannot find a way of recording speech AND listening for
> a DTMF digit being pressed as an alternative.
>
> That's where the problem lies.
>
> J.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jonathan H
Thanks Jurijs,

Yes, in fact I'm already using that, and it works fine. The problem
here is that I cannot find a way of recording speech AND listening for
a DTMF digit being pressed as an alternative.

That's where the problem lies.

J.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jurijs Ivolga
Hi,

I was able to achieve this using:

http://zaf.github.io/asterisk-speech-recog/

I needed to change code, so it wasn't working out-of-the-box. I did this
couple of years ago and unfortunately I do not have code anymore. But it
wasn't too difficult.

With kind regards,

Jurijs

On Wed, Dec 6, 2017 at 4:33 PM, Jonathan H  wrote:

> Briefly: I want to be able to have "press or say (number)", with
> Asterisk listening for a spoken number, but accepting a DTMF digit,
> too.
>
> I'm posting everything I found so far, here, partly to show working,
> but also in case anyone else finds it useful. So, moving on
>
> This looked hopeful for a moment until I realised that it doesn't do DTMF:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+
> Application_SpeechBackground
>
> So then there's
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_Record,
> which can terminate on any DTMF key with "y", but according to the
> docs, "RECORD_STATUS" only sets a flag of "DTMF" (A terminating DTMF
> was received ('#' or '*', depending upon option 't')).
> So, I don't get to know which key was pressed via that method, either.
>
> There's very little information I can find about the built-in
> functions for speech recognition.
> https://wiki.asterisk.org/wiki/display/AST/Speech+Recognition+API
> doesn't actually explain how to integrate the actual speech engines.
>
> In this previous forum post,
> https://community.asterisk.org/t/asterisk-15-jack-
> streams-speech-recognition-so-many-questions/72108/2
> , jcolp explained that most people don't use the speech interface
> anyway, because
> "Asterisk modules are written in C, and it’s more difficult to do
> things in that fashion. Using the Record and ship it off using Python,
> etc, is just easier and gets the job done for a lot of people to where
> they find it acceptable.
> So, AGI it is! But I'm still stuck on how I record for speech AND get
> a DTMF if it was dialled.
>
> Regarding speech in general, even "Asterisk - The Definitive Guide" just
> says:
>
> "Asterisk does not have speech recognition built in, but there are
> many third-party speech
> recognition packages that integrate with Asterisk. Much of that is
> outside of the scope
> of this book, as those applications are external to Asterisk" - helpful!
>
> The speech-rec mailing list at
> http://lists.digium.com/pipermail/asterisk-speech-rec/ hasn't been
> posted to since 2013
>
> Someone else asked about speech recognition and unimrcp in this post:
> http://lists.digium.com/pipermail/asterisk-users/2017-February/290875.html
>
> uniMCRP https://mojolingo.com/blog/2015/speech-rec-asterisk-get-started/
> http://www.unimrcp.org/manuals/html/AsteriskManual.html#_Toc424230605
> This has a Google Speech Recogniser plugin, but it's $50 per channel
> http://www.unimrcp.org/gsr
>
> *Reasons to use Lex over Google TTS*
> • Has just been released in eu-west-1:
> https://forums.aws.amazon.com/ann.jspa?annID=5186
> • Supports 8KHz telepony https://forums.aws.amazon.com/ann.jspa?annID=4775
> • Is in the core AWS SDK
> http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/LexRuntime.html
> • Has a number slot type:
> http://docs.aws.amazon.com/lex/latest/dg/built-in-slot-number.html
>  - this means no accidental recognition of "won", "one" or "juan" instead
> of 1!
>
> The pricing is definitely right: "The cost for 1,000 speech requests
> would be $4.00, and 1,000 text requests would cost $0.75. From the
> date you get started with Amazon Lex, you can process up to 10,000
> text requests and 5,000 speech requests per month for free for the
> first year".
>
> Amazon Transcribe looks promising too, but is only available for
> developer invitation at this time:
> https://aws.amazon.com/transcribe/ https://aws.amazon.com/
> transcribe/pricing/
>
> But all I need now is the quickest, simplest way to send Lex a short
> 8KHz file and get a single digit back, as quickly and reliably as
> possible.
>
> Before I travel too far down this road, can someone point me in the
> right direction and possibly steer me away from the wrong path?!
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman

Re: [asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jurijs Ivolga
Hi,

I was able to achieve this using:


Jurijs

On Wed, Dec 6, 2017 at 4:33 PM, Jonathan H  wrote:

> Briefly: I want to be able to have "press or say (number)", with
> Asterisk listening for a spoken number, but accepting a DTMF digit,
> too.
>
> I'm posting everything I found so far, here, partly to show working,
> but also in case anyone else finds it useful. So, moving on
>
> This looked hopeful for a moment until I realised that it doesn't do DTMF:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+
> Application_SpeechBackground
>
> So then there's
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_Record,
> which can terminate on any DTMF key with "y", but according to the
> docs, "RECORD_STATUS" only sets a flag of "DTMF" (A terminating DTMF
> was received ('#' or '*', depending upon option 't')).
> So, I don't get to know which key was pressed via that method, either.
>
> There's very little information I can find about the built-in
> functions for speech recognition.
> https://wiki.asterisk.org/wiki/display/AST/Speech+Recognition+API
> doesn't actually explain how to integrate the actual speech engines.
>
> In this previous forum post,
> https://community.asterisk.org/t/asterisk-15-jack-
> streams-speech-recognition-so-many-questions/72108/2
> , jcolp explained that most people don't use the speech interface
> anyway, because
> "Asterisk modules are written in C, and it’s more difficult to do
> things in that fashion. Using the Record and ship it off using Python,
> etc, is just easier and gets the job done for a lot of people to where
> they find it acceptable.
> So, AGI it is! But I'm still stuck on how I record for speech AND get
> a DTMF if it was dialled.
>
> Regarding speech in general, even "Asterisk - The Definitive Guide" just
> says:
>
> "Asterisk does not have speech recognition built in, but there are
> many third-party speech
> recognition packages that integrate with Asterisk. Much of that is
> outside of the scope
> of this book, as those applications are external to Asterisk" - helpful!
>
> The speech-rec mailing list at
> http://lists.digium.com/pipermail/asterisk-speech-rec/ hasn't been
> posted to since 2013
>
> Someone else asked about speech recognition and unimrcp in this post:
> http://lists.digium.com/pipermail/asterisk-users/2017-February/290875.html
>
> uniMCRP https://mojolingo.com/blog/2015/speech-rec-asterisk-get-started/
> http://www.unimrcp.org/manuals/html/AsteriskManual.html#_Toc424230605
> This has a Google Speech Recogniser plugin, but it's $50 per channel
> http://www.unimrcp.org/gsr
>
> *Reasons to use Lex over Google TTS*
> • Has just been released in eu-west-1:
> https://forums.aws.amazon.com/ann.jspa?annID=5186
> • Supports 8KHz telepony https://forums.aws.amazon.com/ann.jspa?annID=4775
> • Is in the core AWS SDK
> http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/LexRuntime.html
> • Has a number slot type:
> http://docs.aws.amazon.com/lex/latest/dg/built-in-slot-number.html
>  - this means no accidental recognition of "won", "one" or "juan" instead
> of 1!
>
> The pricing is definitely right: "The cost for 1,000 speech requests
> would be $4.00, and 1,000 text requests would cost $0.75. From the
> date you get started with Amazon Lex, you can process up to 10,000
> text requests and 5,000 speech requests per month for free for the
> first year".
>
> Amazon Transcribe looks promising too, but is only available for
> developer invitation at this time:
> https://aws.amazon.com/transcribe/ https://aws.amazon.com/
> transcribe/pricing/
>
> But all I need now is the quickest, simplest way to send Lex a short
> 8KHz file and get a single digit back, as quickly and reliably as
> possible.
>
> Before I travel too far down this road, can someone point me in the
> right direction and possibly steer me away from the wrong path?!
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Simple speech recognition for driving IVR - "press or say one".

2017-12-06 Thread Jonathan H
Briefly: I want to be able to have "press or say (number)", with
Asterisk listening for a spoken number, but accepting a DTMF digit,
too.

I'm posting everything I found so far, here, partly to show working,
but also in case anyone else finds it useful. So, moving on

This looked hopeful for a moment until I realised that it doesn't do DTMF:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_SpeechBackground

So then there's
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Application_Record,
which can terminate on any DTMF key with "y", but according to the
docs, "RECORD_STATUS" only sets a flag of "DTMF" (A terminating DTMF
was received ('#' or '*', depending upon option 't')).
So, I don't get to know which key was pressed via that method, either.

There's very little information I can find about the built-in
functions for speech recognition.
https://wiki.asterisk.org/wiki/display/AST/Speech+Recognition+API
doesn't actually explain how to integrate the actual speech engines.

In this previous forum post,
https://community.asterisk.org/t/asterisk-15-jack-streams-speech-recognition-so-many-questions/72108/2
, jcolp explained that most people don't use the speech interface
anyway, because
"Asterisk modules are written in C, and it’s more difficult to do
things in that fashion. Using the Record and ship it off using Python,
etc, is just easier and gets the job done for a lot of people to where
they find it acceptable.
So, AGI it is! But I'm still stuck on how I record for speech AND get
a DTMF if it was dialled.

Regarding speech in general, even "Asterisk - The Definitive Guide" just says:

"Asterisk does not have speech recognition built in, but there are
many third-party speech
recognition packages that integrate with Asterisk. Much of that is
outside of the scope
of this book, as those applications are external to Asterisk" - helpful!

The speech-rec mailing list at
http://lists.digium.com/pipermail/asterisk-speech-rec/ hasn't been
posted to since 2013

Someone else asked about speech recognition and unimrcp in this post:
http://lists.digium.com/pipermail/asterisk-users/2017-February/290875.html

uniMCRP https://mojolingo.com/blog/2015/speech-rec-asterisk-get-started/
http://www.unimrcp.org/manuals/html/AsteriskManual.html#_Toc424230605
This has a Google Speech Recogniser plugin, but it's $50 per channel
http://www.unimrcp.org/gsr

*Reasons to use Lex over Google TTS*
• Has just been released in eu-west-1:
https://forums.aws.amazon.com/ann.jspa?annID=5186
• Supports 8KHz telepony https://forums.aws.amazon.com/ann.jspa?annID=4775
• Is in the core AWS SDK
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/LexRuntime.html
• Has a number slot type:
http://docs.aws.amazon.com/lex/latest/dg/built-in-slot-number.html
 - this means no accidental recognition of "won", "one" or "juan" instead of 1!

The pricing is definitely right: "The cost for 1,000 speech requests
would be $4.00, and 1,000 text requests would cost $0.75. From the
date you get started with Amazon Lex, you can process up to 10,000
text requests and 5,000 speech requests per month for free for the
first year".

Amazon Transcribe looks promising too, but is only available for
developer invitation at this time:
https://aws.amazon.com/transcribe/ https://aws.amazon.com/transcribe/pricing/

But all I need now is the quickest, simplest way to send Lex a short
8KHz file and get a single digit back, as quickly and reliably as
possible.

Before I travel too far down this road, can someone point me in the
right direction and possibly steer me away from the wrong path?!

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users