Options

Text-to-Speech : Making Nav Speak

UltramayankUltramayank Member Posts: 28
Navision can use the default text-to-speech capabilities that come inbulid into the latest windows operating systems starting Windows XP. Make you form speak out the error or warning message, or give you user voice instructions to use your custom modules. Here's how Its Done
http://extremeengineers.net/dynamics-nav/23-text-to-speech-making-nav-speak-out.html
Mayank Bhardwaj
Visit My Blog at
http://extremeengineers.net/

Comments

  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
  • Options
    SavatageSavatage Member Posts: 7,142
    edited 2010-09-30
    I Personally feel, if you want it to be a tip & trick you should supply the code.
    your link contains an errors:

    1. you can't download the sample if someone wanted too.
    2. You name it speaker but your code below shows SPvoice?
    In Dynamics Nav all you need to do is create a automation variable as
    Name DataType Subtype
    speaker Automation Microsoft Speech Object Library'.SpVoice
    and we are ready to go.
    There's a bit more to it & why give the incorrect code?
    Syntax for this would be
    SpVoice.Speak(TextVar); //Synchronous Call
    SpVoice.Speak(TextVar,1); //Asynchronous Call

    What you're looking to do is like this....
    Define Global
    speaker---Automation---Microsoft Speech Object Library'.SpVoice
    OnRename()
    IF NOT ISCLEAR(Speaker) THEN
    CLEAR(Speaker);
    CREATE(Speaker);
    Speaker.Speak(Text001);

    *Where you can define Text001 in Text constants.

    An example could be. OnRename of item table add that code with
    Text001 as "Are you sure you want to rename this item"
  • Options
    DenSterDenSter Member Posts: 8,304
  • Options
    SavatageSavatage Member Posts: 7,142
    I personally fixed it above 8)

    I did find a good use for it. I have one code that always get's clicked thru so perhaps this will alert them more. (unless the sound is off)

    I have added a field to the vendor table called "Variable Terms" type boolean.
    We check off vendors that don't stick to or have specific terms, perhaps seasonal.

    Since the terms could be simply NET30 or perhaps the next invoice just has a random due date ie/ 12/15/2010 etc.

    we have alot of trouble with these types of vendors because the person posting PO's 99% of the time the terms on the vendor card are correct. So they just enter the invoice # & post.

    I thought a message alert would help but not always. So now I added the voice along with the message alert & we'll give it a try tomorrow.

    Text035 = "Document Date cannot be GREATER than the Posting Date on Order %1"
    Text036 = "This vendor has a history of variable terms........ Please double check the terms for this invoice."

    Vendor Invoice No. - OnValidate() //Purchase Header Table
    //Mod Start
    IF "Document Date" > "Posting Date" THEN ERROR(Text035,"No.");
    IF "Variable Terms" THEN BEGIN
     IF NOT ISCLEAR(Speaker) THEN
      CLEAR(Speaker);
      CREATE(Speaker);
      Speaker.Speak(Text036);
     MESSAGE('Vendor %1 - %2\\Uses Variable Terms - Double Check Invoice!',"Buy-from Vendor No.",Name);
    END;
    //Mod End
    

    :mrgreen:
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
  • Options
    UltramayankUltramayank Member Posts: 28
    Hi Mr Harry Sir,
    Well the code I put on was merely an example of syntax and not the code exactly. Since it was a generalized use I thought it was better to use the class name than the parent name.
    I apologise for the faulty download, it has been fixed. I have also submitted the object for Mibuso's download section.
    I didn't give too much details cos I was providing a demo object.
    But I appreciate your efforts for correcting it. Thanks

    The library provides some events the use of which you'd find in my object. That could make things even more interactive. So I advice you take a look at my object too :D .
    And if you do use it, at least remember me in you mind for introducing this to you, if not appreciating me and giving me the credits :mrgreen: , Just joking, don't flame me for this again :D .

    And thank you Alex, I am glad that you found it useful :).
    Mayank Bhardwaj
    Visit My Blog at
    http://extremeengineers.net/
  • Options
    SavatageSavatage Member Posts: 7,142
    Alex Chow wrote:
    E-ship would be the place where I would put this to use.
    I can hear it now.

    "Sales Order Found"
    //CPP "Close Package Print"
    //CSO "Close Sales Order"
    //DAP "Are you sure you want to delete all the packages"

    Sorry to go off topic for a sec - but when you print all the e-ship barcode commands there is only one without a description //X. I'm afraid to try it :-#. WHat does it do?
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    Savatage wrote:
    Alex Chow wrote:
    E-ship would be the place where I would put this to use.
    I can hear it now.

    "Sales Order Found"
    //CPP "Close Package Print"
    //CSO "Close Sales Order"
    //DAP "Are you sure you want to delete all the packages"

    Sorry to go off topic for a sec - but when you print all the e-ship barcode commands there is only one without a description //X. I'm afraid to try it :-#. WHat does it do?

    Yep, you can basically create your own set of commands. Try it, it really works!
Sign In or Register to comment.