Author |
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 05 2010 at 04:02 | IP Logged
|
|
|
Ok so everytime anybody see me talking to my computer they always want to have a conversation with it rather than care that the lights just went on and off. So i am wondering the best way to set up a macro or something to be able to talk back and forth and have my TTS ask questions about how my day was and other trival matters. So far i am attempting to use one big macro and a seperate voice grammer for when i feel chatty. The setup in the macro uses TTS input boxes to asks a question, and my response is picked up by the VR then uses send keys to spell out whatever i just said. Then, GoTo [inputret] ... so each response has a lable. i want to be able to have an on going conversation back and forth so after I respond, another question is asked, untill i tell it to shut off. SOOoooo Problem 1 is should i use seperate macros for each instance. I keep running into probalem where i have the same answer for multiple questions. .... how was your day? and how are the fish? might have the answer 'fine' so the lables are the same.... any of this make any sense. Pleeease keep in might i am pretty much a total noooob, just learning to write my first if statments. but i do loves my powerhome
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 05 2010 at 08:37 | IP Logged
|
|
|
I would be interested to see how this works out. Probably someone has played with this. I would use separate macros. TTS seems to run on its own when queued thus causing an apparent delay. I’ve tried using sub-macros and that didn’t make it run serial either. Triggering the response driving a macro that differentiates in a table might work.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 06 2010 at 07:04 | IP Logged
|
|
|
I am thinking it would be easier if I could have what the VR hears as a temp variable. I can see the little window, that tells you what the VR just heard, with the windows spy. however this :
ph_playwinmsg("pwrhome.exe","FNWND3105"," PowerHome - [PowerHome Explorer - c:\program files\powerhome\database\pwrhome.db]",0,7,"","")
ph_locatehandle("pwrhome.exe","FNWND3105"," PowerHome - [PowerHome Explorer - c:\program files\powerhome\database\pwrhome.db]",0,7,"","",0,0)
doesnt make too much sence to me. Not to sure how to use it.
Any thoughts?
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 06 2010 at 09:05 | IP Logged
|
|
|
Why would you be looking at messages instead of using PH VR? Although to qualify myself, I have no experience in this area.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 08 2010 at 08:26 | IP Logged
|
|
|
i am using the VR. Then just have VR use send keys to spell out whatever I just said into the input box. That is my problem. I can only have one answer for each specfic question. I am thinking if i could figure out how to use the global variablas a little better, maybe i could make it so it didnt repeat itself and went to the next question. Or a random question would be even better. Like I say I am very new at this. Powerhome is really my first attemt to do any kind of code writing (except for my MythBox).
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 08 2010 at 08:41 | IP Logged
|
|
|
How are you treating the input to send the next question? I would have thought you would read it into a variable and analyze the answer then select the next question. If that is basically what you’re doing and it is repeating then I would suspect how you are triggering the response.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 09 2010 at 06:58 | IP Logged
|
|
|
Let me see if this can be clarified. Ideally there would be a list of say 20 questions. Each question would have a variable to know if had been asked recently. and would of course have a responce, followed by the next random question.
this is kinda what I have set up now. one big macro with different lables, and a series of input boxes.
For instance ( I call my computer meshell) and I am Jesse --
(while im in my main grammer i use)
JESSE: "Meshell, I need to talk"
-the grammer gets changed, and an input box pops up and says-
MESHELLE: Hello, How are you today?
JESSE: "good" or "fine" or "bad"
-once I give my answer the VR uses send keys to spell out in the input box whatever was said. So if I say 'good' then 'good' is put into the input box. From there it jumps to the lable GOOD-
-another input box pops up-
MESHELL: "Thats good I'm glad to hear it. Do u have any plans for the evening?"
JESSE: "not yet" or "i have to work"
-then agiin sendkeys types out my answer to the input box and it jumps to that lable-
As you can see all that can happen is after one question is asked one unique answer has to be given, and only one specfic follow up question can be asked to me. So i am looking for a better set up all together. Once again i am very new at this. IF functions and variables are still unfamiliar to me really. just starting to get uesd to writing the formulas and figuring out, after an hour, that i had one extra ) .... so any help is awesome. Just ecplain it to me like I'm an 8 year old
make that a 5 year old
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 09 2010 at 09:05 | IP Logged
|
|
|
I understand the 5 year old mentality. Can you show us a screen shot of the macro?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 09 2010 at 22:27 | IP Logged
|
|
|
sure.... but how do I up load the .xps file. That is all i can save screen print as.
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 10 2010 at 08:55 | IP Logged
|
|
|
Try this: PH Explorer- click on Macros – right click on the macro and Export. Rename the extension .sql to .txt. Double click it and copy text to Post. That will allow us to view it or test it.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: October 11 2010 at 06:41 | IP Logged
|
|
|
I always wondered how to do that...2010-10-11_064040_AI.txt
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: October 11 2010 at 09:11 | IP Logged
|
|
|
The only problem I found while testing was there is no catch all for an invalid replys. Where you Jump 999 change to Go To “exit”. After last line add Label exit . Then add after User Message "[INPUTRET]". This might indicate what the invalid response is. I tested by changing the time out to 15 and typed the message in the box. Also SubMacro should be ph_macro("submorning").
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
reighnman Newbie
Joined: October 04 2010
Online Status: Offline Posts: 26
|
Posted: December 09 2010 at 14:13 | IP Logged
|
|
|
OK I am making good progress. Thanks a ton for the help. I was wondering about the different options for the VR so far i have found (junkbegin) (junkend) to have it pick up the phrase in the middle of a sentance etc, and [opt] for optioning a word. Is there anything else like [opt1] /[opt2] so one of the two word must be said ..... for instance when I turn my receiver on the syntax is turn yourself [opt] on [opt] off so if I say "turn yourself on", the receiver power toggles, via usbuirt. If I say "turn yourself off", the receiver power toggles. and if I say "turn yourself" the receiver power toggles. Is there a way so it has to have one of the two options? Is there any other ways to control the syntax ?
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: December 09 2010 at 14:28 | IP Logged
|
|
|
Now that you are an expert I will have to do further testing. Maybe someone can jump in with an answer.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|