Author Topic: Do you want autocad speak ?  (Read 81306 times)

0 Members and 1 Guest are viewing this topic.

Harrie

  • Guest
Re: Do you want autocad speak ?
« Reply #105 on: March 26, 2011, 08:49:49 PM »
Nice Jokes,

But is it possible to change the voice of Mary in something different,
without using  Microsoft Speech SDK 5.1.
Code: [Select]
(vl-load-com)
(setq Sapi (vlax-create-object "Sapi.SpVoice"))
(setq Voice (vlax-get-property Sapi 'voice))
(vlax-dump-object Voice T)
With Microsoft Speech I only hear the voices of Mary, Mike and Sam.

Regards.
« Last Edit: March 26, 2011, 08:55:31 PM by Harrie »

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Do you want autocad speak ?
« Reply #106 on: March 28, 2011, 09:51:27 AM »
Totally off topic, but are those your feet/shoes, Matt? I've seen those shoes but don't know anyone with them. Do you like them?
Yes, those are my feet/shoes.  I have two pairs and I love 'em.  Those are the Vibram KSOs.  I do about 25% of my running in them - roads, dreadmill, or in this case muddy trails.  :love:

I'm easing back into them after this past winter when I didn't use them at all - I've got start building up the calluses on my feet again.
Very cool. Is there a difference in those and what they call Camp Shoes?
I've been wanting to get a pair, but the price is a hard pill to swallow. I been working for years at hardening my feet (don't wear shoes unless I have to), but I'm still not brave enough to cruise deep in the woods barefoot.
It'd be a site seeing me come out of the woods during hunting season wearing those.  :lol:

I'll eventually get a pair...
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Do you want autocad speak ?
« Reply #107 on: March 28, 2011, 09:54:53 AM »
Totally off topic, but are those your feet/shoes, Matt? I've seen those shoes but don't know anyone with them. Do you like them?
Yes, those are my feet/shoes.  I have two pairs and I love 'em.  Those are the Vibram KSOs.  I do about 25% of my running in them - roads, dreadmill, or in this case muddy trails.  :love:

I'm easing back into them after this past winter when I didn't use them at all - I've got start building up the calluses on my feet again.
Very cool. Is there a difference in those and what they call Camp Shoes?
I've been wanting to get a pair, but the price is a hard pill to swallow. I been working for years at hardening my feet (don't wear shoes unless I have to), but I'm still not brave enough to cruise deep in the woods barefoot.
It'd be a site seeing me come out of the woods during hunting season wearing those.  :lol:

I'll eventually get a pair...
What are "camp shoes"?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Do you want autocad speak ?
« Reply #108 on: March 28, 2011, 09:56:07 AM »
Totally off topic, but are those your feet/shoes, Matt? I've seen those shoes but don't know anyone with them. Do you like them?
Yes, those are my feet/shoes.  I have two pairs and I love 'em.  Those are the Vibram KSOs.  I do about 25% of my running in them - roads, dreadmill, or in this case muddy trails.  :love:

I'm easing back into them after this past winter when I didn't use them at all - I've got start building up the calluses on my feet again.
Very cool. Is there a difference in those and what they call Camp Shoes?
I've been wanting to get a pair, but the price is a hard pill to swallow. I been working for years at hardening my feet (don't wear shoes unless I have to), but I'm still not brave enough to cruise deep in the woods barefoot.
It'd be a site seeing me come out of the woods during hunting season wearing those.  :lol:

I'll eventually get a pair...
What are "camp shoes"?
http://www.amazon.com/Original-MuckBoots-Unisex-Edgewater-Womens/dp/B000WG7NV6/ref=sr_1_1?ie=UTF8&qid=1301320551&sr=8-1
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Do you want autocad speak ?
« Reply #109 on: March 28, 2011, 10:04:01 AM »
Yeah... Vibrams are a LOT different from camp shoes.   :-D
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Do you want autocad speak ?
« Reply #110 on: March 28, 2011, 10:05:25 AM »
Yeah... Vibrams are a LOT different from camp shoes.   :-D
Minus the toes? I've never seen either in person, so I really was curious.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

jah011

  • Guest
Re: Do you want autocad speak ?
« Reply #111 on: March 18, 2015, 10:41:17 AM »
Hi guys... I like this thread so much.

I am trying to make it work but my skills are still quite poor.

I would like to make acad say Kaboom when I explode ...

i did this simple code but it is not really synchronized :)

Code: [Select]
(defun  C:exx () (command "explode")
(setq sapi (vlax-create-object "Sapi.SpVoice"))
(vlax-invoke sapi "Speak" "Kaboom" 0)
(vlax-release-object sapi))

I would like to see principle , to have simple function that after it is done says something or even better play a sound. Also I would need to have volume up.

Thanks
Jan

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Do you want autocad speak ?
« Reply #112 on: March 18, 2015, 03:09:47 PM »
Hi jah011 and welcome to theswamp.


try this:

Code: [Select]
(defun  C:exx ()
(command "._explode")
(while (/= 0 (getvar 'cmdactive))
  (princ)
  )
(setq sapi (vlax-create-object "Sapi.SpVoice"))
 (vlax-put-property sapi 'volume 2);;;volume
  (vlax-put-property sapi 'rate 2);;;speed
(vlax-invoke sapi "Speak" "Kaboom" 0)
(vlax-release-object sapi)
  )

« Last Edit: March 18, 2015, 03:17:24 PM by Andrea »
Keep smile...

jah011

  • Guest
Re: Do you want autocad speak ?
« Reply #113 on: March 18, 2015, 05:28:21 PM »
Hi Andrea!
Thanks for the help!
I changed a routine according to some other comments and it goes like this now

Code: [Select]
(defun  C:kab () (command "explode")
(while (> (getvar 'cmdactive) 0) (command pause))

(setq sapi (vlax-create-object "Sapi.SpVoice"))
 (vlax-put-property sapi 'volume 100);;;volume
  (vlax-put-property sapi 'rate -3);;;speed
(vlax-invoke sapi "Speak" "Kaboom" 0)
(vlax-release-object sapi)
  )

Another thing, maybe i am stretching out too far but i was trying to implement your code for playing wav... but no success

Quote
(setq objVoice (vlax-create-object "Sapi.SpVoice")
      objFile  (vlax-create-object "SAPI.SpFileStream.1")
)
(vlax-invoke objFile "Open" "c:\\Windows\\Media\\Ding.wav")
(vlax-invoke objVoice "Speakstream" objFile 0)
(vlax-release-object objVoice)
(vlax-release-object objFile)

BlackBox

  • King Gator
  • Posts: 3770
Re: Do you want autocad speak ?
« Reply #114 on: March 18, 2015, 06:07:39 PM »
These old posts may be of use.  :-)

Cheers




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

NICK_VNV

  • Newt
  • Posts: 63
Re: Do you want autocad speak ?
« Reply #115 on: March 19, 2015, 08:26:03 AM »
Another thing, maybe i am stretching out too far but i was trying to implement your code for playing wav... but no success

Quote
(setq objVoice (vlax-create-object "Sapi.SpVoice")
      objFile  (vlax-create-object "SAPI.SpFileStream.1")
)
(vlax-invoke objFile "Open" "c:\\Windows\\Media\\Ding.wav")
(vlax-invoke objVoice "Speakstream" objFile 0)
(vlax-release-object objVoice)
(vlax-release-object objFile)
Try this method for wav, mp3, etc...
Code: [Select]
(Setq wmp (vlax-get-or-Create-Object "MediaPlayer.MediaPlayer.1"))
(vlax-invoke-method wmp 'Open "c:\\Windows\\Media\\Ding.wav")
...
(vlax-invoke-method wmp 'Stop)
(vlax-release-object wmp)
Sorry for my English...

NOT SURE

  • Guest
Re: Do you want autocad speak ?
« Reply #116 on: March 19, 2015, 09:55:37 AM »
How would this be done in a SCR type file outside of AutoCad?

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Do you want autocad speak ?
« Reply #117 on: March 19, 2015, 10:58:12 AM »
How would this be done in a SCR type file outside of AutoCad?


Maybe THIS ?

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

NOT SURE

  • Guest
Re: Do you want autocad speak ?
« Reply #118 on: March 19, 2015, 12:55:12 PM »
How would this be done in a SCR type file outside of AutoCad?


Maybe THIS ?

Couldn't the SAPISpVoice be called through a SCR or a BAT file? I've tried the VBS route but I can't run it since I don't have Visual Studio.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Do you want autocad speak ?
« Reply #119 on: March 19, 2015, 01:03:38 PM »
You should be able to copy the code into notepad and save the file with a VBS extension. Then just double click on it.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC