X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Wish List => Topic started by: JimC on October 27, 2004, 07:10:23 PM

Title: Voice
Post by: JimC on October 27, 2004, 07:10:23 PM
I use several of the X10 motion sensors. I
have a window that shows all of the motion
sensors. It would be nice if a user
selected wave file could be played when the
sensors are tripped.

Jim
Title: Re: Voice & Sound
Post by: amigamax on October 19, 2006, 09:57:12 PM
8) I whole heartedly second the motion.   8)

Playing sounds ought to be an internal function of ActiveHome/SmartMacros, and should not be at all difficult to implement.
It could be easily expanded to also include speech synthesis from Windows functions & playing media.  ??? 

- I definitely think ActiveHome needs an internal function in SmartMacros called "Play Sound".
I expect there are internal libraries already in Windows that can be called to play sounds, as is used for system events. 

- There is also a speech synthesizer that is likely only a library call or command away... If Flag, Funct_Say "Status Active" etc....

- Also if Windows media player can be called as full screen, "Play media" would be another excellent external command, but
eat a lot more resources in the process by loading WMP.  It could be used with the Composite Video senders & VGA video senders. 

I just bought OnAlert and can't play a WAV to tell me which house door was opened, or if my system is armed or disarmed...
This is of critical usefulness...  The only option I have thus far is to set off the chime or a light or the Power Horns!!! 
This simply won't do.  I tried to use a 3rd party sound player, but to no avail so far.  :'(
Works fine from the command line, but not from AHP Smartmacros as an external command. I wonder why not? 
I Will continue to mess with it... 

I'm looking into X10 dispatcher, but this is severely overkill for what I want to do at the moment. 
It looks like dispatcher is very flexible, diverse, and at first complicated. 
It may become a server on a separate computer before I am done... http://www.x10dispatcher.com/ 

Please guys, pick up the ball find the libraries and windows calls, and let me use AHP to call them!! 
It would make your software so much more useful, and fun, too! 
2-way module macro could check status, if on, say "coffee pot is ON"
Different doorbells if front or back door detects motion or DS10 is triggered.
It could be used with a timer to tell the kids to "Shut the door" 
If no system speech call, could use sound recorder to make WAVs on my own, but still can't play them!!
It surprises me that this was overlooked.  Playing a WAV is so basic!!  Come on, guys!!!  It's only a system call away!!!

Thanks

Gizmo.
Title: Re: Voice
Post by: Charles Sullivan on October 19, 2006, 10:21:28 PM
II just bought OnAlert and can't play a WAV to tell me which door opened, or if my system is armed or disarmed...  The only option thus far is to set off the chime or a light or the ALARM!!!  This simply won't do. I tried to use a 3rd party sound player, but to no avail.  Works fine from the command line, but not from AHP Smartmacros as an external command. Why not?

Instead of calling the external commands directly. try putting them in a batch file and executing the batch file in AHP. 

Title: Re: Voice
Post by: Tuicemen on October 19, 2006, 11:00:02 PM
Instead of calling the external commands directly. try putting them in a batch file and executing the batch file in AHP. 
I can play a wav file doing this! ;) :D :)
Title: Re: Voice & Sound - WAV Player call from SmartMacros
Post by: amigamax on October 19, 2006, 11:04:23 PM
> Instead of calling the external commands directly. try putting them in a batch file and executing the batch file in AHP. 

This does work on my Win2000 machine; I have to select ALL FILES from the requester window, then select my batch file.
I am using a program called sounder.exe to play the WAV files.  It cuts off at 2 seconds as compiled... but at least it works. 
It makes a pop on some files and is a kludge when batched, but 100% better than the results I got before. (nothing)

my batch file (playsound1.bat) consists of:

sounder filename.wav

-=-=-=-
I used windows notepad to create the file, containing the line above, and renamed the file to playsound1.bat after saving it.
 
To the other poster, what WAV player are you using?  I failed to get sound recorder to work as a player.
Windows media player or the other major media players are too big.
I need a better command line or SMALL windows sound player that is system friendly. 
Also if it has any parameters for playing the WAV x number of times, definite plus!.

MP3 would be nice, too...  I'll look after setting up my macros. 
I don't want to launch a conventional media program & load in a boatload of libraries for this purpose at this point.
I want to still use the computer's Via C3 (weak) processor for other things like VNC & network utilities etc.

Thanks!  At least it's progress...



Title: Re: Voice (Sound Recorder Solution for WAV files!)
Post by: amigamax on October 20, 2006, 02:21:41 AM
After digging I found out the command line for windows sound recorder is:

;D  sndrec32 /play /close "C:My Documentssound.wav" etc etc.  ;D
(Quotes included because of space in My Documents)

- Still can not call it directly.  Still have to batch it.
- If you don't specify /close, it will stay open and the script hangs till you close sound recorder.
- You can call the routine back to back in the batch but there is still a delay between executions. 
- No time restriction here - you could play a 53 MB file so far as I know...

This is not documented in windows, and is sparsely available online. 
Trying echo & reverse parameters were useless.

16 bit OS may have different exe name, but sound recorder existed on 3.1/95/98a as well.

I still hope they'll figure out how to call it directly in windows as a system sound so it's more system friendly &
gives no visual indication, less delay in calling it, and back to back sound executions willl have *minimal* delay.

Gizmo  ;)
Title: Re: Voice
Post by: Puck on October 21, 2006, 02:47:39 PM
Here's a site where you can download WAV files that you create: AT&T Labs: Text-To-Speech (TTS) -- Our Demo Speaks Your Text (http://www.research.att.com/%7Ettsweb/tts/demo.php)


[TTA Edit: Added description to LINK.]
Title: Re: Voice (Sound Recorder Solution for WAV files!)
Post by: Tuicemen on October 22, 2006, 03:16:07 PM
;D  sndrec32 /play /close "C:My Documentssound.wav" etc etc.  ;D
(Quotes included because of space in My Documents)
This is the way I'm doing it! ;)
I may look into creating a player which will allow repeats! If I get time! ::) ;)
Title: Re: Voice
Post by: Tuicemen on October 24, 2006, 08:35:58 PM
Ok I've created a small wave player  (X10WavPlayer) (http://www.angelfire.com/in2/ontkoi/X10AHP/index.html) which will allow looping ! ;) :D ;D
Note: you'll need Net Framework   (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en) installed for this to work!
Title: Re: Voice
Post by: Jollydodger on October 25, 2006, 02:41:01 AM
Ok I've created a small wave player  (X10WavPlayer) (http://www.angelfire.com/in2/ontkoi/X10AHP/index.html) which will allow looping ! ;) :D ;D
Note: you'll need Net Framework   (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&DisplayLang=en) installed for this to work!

This is probably a stupid question but how do you call the batch file?  Thanks
Title: Re: Voice
Post by: Puck on October 25, 2006, 03:19:11 AM
This is probably a stupid question but how do you call the batch file?  Thanks

Only stupid question is one NOT asked.  ;)

You can call it from a MACRO. Under your ROOMS selection menu, there is a selection called "Advanced Functions", when you select that you will see a "Windows Command (PC Required)" item. Drag and drop this in your MACRO and from there you can browse and select your "*.BAT" file.
Title: Re: Voice
Post by: Jollydodger on October 25, 2006, 08:40:25 AM
This is probably a stupid question but how do you call the batch file?  Thanks

Only stupid question is one NOT asked.  ;)

You can call it from a MACRO. Under your ROOMS selection menu, there is a selection called "Advanced Functions", when you select that you will see a "Windows Command (PC Required)" item. Drag and drop this in your MACRO and from there you can browse and select your "*.BAT" file.

I now see that in Smart Macros. Since I just got Smart Macros today could someone maybe run through how I play a sound when a motion sensor detects motion at night and turns on a light during the day. I am pretty sure I understand how to call the batch file but I don't see how to connect the Motion Sensor with the calling of the batch file in the Macro.

Thanks for the help.
Title: Re: Voice
Post by: Tuicemen on October 25, 2006, 04:50:51 PM
The motion sensor address is the trigger address of your macro!
For more info check the smartmacros section here there are many posts about triggering from a motion sensor one maybe just what your lookig for!
To speed things up you can do a search which should pull up some examples! ;)
Title: Re: Voice
Post by: Jollydodger on October 25, 2006, 06:47:55 PM
Thanks again for the good ideas.
Title: Re: Voice
Post by: TakeTheActive on October 25, 2006, 08:34:22 PM

This is probably a stupid question but how do you call the batch file?

Only stupid question is one NOT asked.  ;)

UNLESS, of course,  it has ALREADY BEEN ANSWERED :o in a FAQ, painstakingly assembled and posted by one of our gracious VOLUNTEERS!. 8)


To speed things up you can do a *SEARCH* which should pull up some examples! ;)[/size]

You CANNOT GO WRONG following GREAT ADVICE like this!!! ;D
Title: Re: Voice
Post by: noudo on November 18, 2006, 02:54:44 AM
Call me a super newbie but even after reading through all of these forums, I have still yet to tie a motion sensored macro to a simple sound file.  Some one please help!
Title: Re: Voice
Post by: Puck on November 18, 2006, 12:23:27 PM
I placed an example of this here: Triggering a sound file from a Macro (http://www.x10community.com/forums/index.php?topic=10940.msg62629#msg62629)

If you have any more questions about this, please reply back here in this thread.
Title: Re: Voice
Post by: -Bill- (of wgjohns.com) on January 01, 2007, 05:35:49 AM
I am amazed I missed this thread for so long!

BXVC (Bill's X10 Voice Commander) will:

See the BXVC thread at: http://www.x10community.com/forums/index.php?topic=9918.0
or visit the download page at: http://www.wgjohns.com/bxvc.htm
Title: Re: Voice
Post by: webrod on May 07, 2011, 05:21:22 AM
Hi,

in case it helps, I did a small batch to enable the sound (in case it is mute off) and set it to the maximum, then it plays a sound. The sound of a dog in my exemple  ;)

nircmd.exe mutesysvolume 0
nircmd.exe changesysvolume 65535
sndrec32 /play /close d:\alarm\dog_alarm.wav
exit

FYI nircmd is a nice very small and free tool that you can download on the net.

Rod