See the top rated post in this thread. Click here

Page 6 of 7 FirstFirst ... 234567 LastLast
Results 51 to 60 of 65

Thread: AutoCAD Speak

  1. #51
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    419
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    I finally implemented speakit.lsp in one of my programs!
    Works great!

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.
    Say goodbye to detail books.

  2. #52
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    419
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Thankyou Terry for the awsome way to make autocad speak!
    I used it in one of my major projects.

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.
    Say goodbye to detail books.

  3. #53
    All AUGI, all the time arshiel88's Avatar
    Join Date
    2005-02
    Location
    Off the Grid
    Posts
    560
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    I want to hide the command line and let it speak the prompts, (e.g. "Specify first point." etc.) Is it possible?

    Shielbern Bolalin
    Architectural 3D Renderer
    ----------------------------------------------------------------------
    “A clever person solves a problem. A wise person avoids it.”

    1879-1955

  4. #54
    Member
    Join Date
    2011-05
    Posts
    2
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    This is to fun. Sorry had to.
    Attached Files Attached Files

  5. #55
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    More importantly... Which Windows Object controls the Volume / Mute setting?

    Edit: Found it! Settings.Mute

    Edit: Also helpful - Settings.Volume

    Mwaaatttaaaatttttaatttatataaaaaahhh!!!!

    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  6. #56
    Member
    Join Date
    2008-06
    Posts
    8
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Quote Originally Posted by RenderMan View Post
    More importantly... Which Windows Object controls the Volume / Mute setting?

    Edit: Found it! Settings.Mute

    Edit: Also helpful - Settings.Volume

    Mwaaatttaaaatttttaatttatataaaaaahhh!!!!

    How to implement this in Lisp?

    Regards.

  7. #57
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Quote Originally Posted by jaap.spierenburg View Post
    How to implement this in Lisp?
    Edit: WARNING - Use at your own risk.

    Edit: Code revised such that the respective objects are supplied as an argument to reduce the number of time each is created and released.

    First, download the applicable version of nircmd.exe: 32 Bit, 64-Bit, More on nircmd.exe

    Second, use the applicable function for your needs:

    Code:
    (defun MUTE  (oShell i / )
      ;; © RenderMan 2011
      ;; Example (mute <ShellObject> <Option>)
      ;; Arguments:
      ;;     <ShellObject>     "WScript.Shell" object
      ;;     <Option>         An integer of 0, 1, or 2
      ;;                 0=Unmute, 1=Mute, 2=Toggle
      (if (findfile "nircmd.exe")
        (vlax-invoke
          oShell
          'run
          (strcat "nircmd.exe mutesysvolume "
                  (itoa (fix i))))
        (prompt "\n** Cannot find \"nircmd.exe\" ** "))
      (princ))
    Code:
    (defun SETVOLUME  (oShell vol /)
      ;; © RenderMan 2011
      ;; Example (setvolume <ShellObject> <Volume%>)
      ;; Arguments:
      ;;     <ShellObject>     "WScript.Shell" object
      ;;     <Volume%>     Real or integer equal to, or between 0 and 1
      (if (findfile "nircmd.exe")
        (progn
          (vlax-invoke oShell 'run "nircmd.exe changesysvolume -65535")
          (vlax-invoke
            oShell
            'run
            (strcat "nircmd.exe changesysvolume "
                    (itoa (fix (* vol 65535.))))))
        (prompt "\n** Cannot find \"nircmd.exe\" ** "))
      (princ))
    Edit: There's a time and place for everything... even fun at the workplace:
    Code:
    (defun TellUser  (string / *error* sayit oShell oSapi)
      ;; © RenderMan 2011
      ;; Example (TellUser "Hey, You! Get back to work. Hah zah!")
      ;; Arguments:
      ;;     string    Phrase to be spoken by Sapi.SpVoice object
      (vl-load-com)
    
      (defun *error*  (msg)
        (and oShell
             (setq oShell
                    (vl-catch-all-apply 'vlax-release-object (list oShell))))
        (and oSapi
             (setq oSapi
                    (vl-catch-all-apply 'vlax-release-object (list oSapi))))
        (cond ((not msg))                                                   ; Normal exit
              ((member msg '("Function cancelled" "quit / exit abort")))    ; <esc> or (quit)
              ((princ (strcat "\n** Error: " msg " ** "))))                 ; Fatal error, display it
        (princ))
    
      (defun sayit  (oSapi string /)
        ;; © RenderMan 2011, inspired by Patrick_35
        ;; Linky:    http://www.theswamp.org/index.php?topic=14549.0
        (vlax-invoke oSapi 'speak string 0)
        (princ))
    
      (if (and (setq oShell (vlax-get-or-create-object "WScript.Shell"))
               (setq oSapi (vlax-get-or-create-object "Sapi.SpVoice")))
        (progn
          (mute oShell 0)
          (setvolume oShell 0.50)
          (sayit oSapi string)
          (*error* nil))
        (cond (oShell (*error* "Could not create \"Sapi.SpVoice\" object"))
              ((*error* "Could not create \"WScript.Shell\" object")))))
    Happy coding!

    Last edited by RenderMan; 2011-12-23 at 08:52 AM. Reason: Code revised.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  8. #58
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Code revised, see comments above.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  9. #59
    I could stop if I wanted to aaronic_abacus's Avatar
    Join Date
    2006-04
    Posts
    419
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Does anyone know how to control the gender of the voice?

    http://www.watsonlisp.com

    Artificial Intelligence for AutoCAD
    Find detail drawings by text and attribute content!
    6000 lines of code and and in development since 1997.
    Say goodbye to detail books.

  10. #60
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,536
    Login to Give a bone
    0

    Default Re: AutoCAD Speak

    Not gender specific, but consider using the Voice Property of the SAPI.SpVoice Object.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Page 6 of 7 FirstFirst ... 234567 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 2015-08-07, 04:03 PM
  2. Speak 4 cad
    By maa in forum Software
    Replies: 9
    Last Post: 2006-06-30, 12:13 PM
  3. speak to autocad
    By jaberwok in forum Software
    Replies: 9
    Last Post: 2005-11-09, 08:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •