Announcement

Collapse
No announcement yet.

Stock script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I do it because I enjoy helping others and convincing others that HS is the best home automation package there is.

    -Rupp
    Isn't Disney World a people trap operated by a mouse?
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #17
      Automated Kid

      Here is the thread for the horoscope script. It works like a champ!

      http://ubb.homeseer.com/6/ubb.x?a=tp...4&m=2816003943

      Comment


        #18
        Rupp, no problem, it's well deserved, and I'll even agree with your statement about HS, because not only do I use, but I have my brother using it and possibly a few friends might be trying it as well.

        And Hanfseer, thanks for the link, I think I just added a new script!

        Glen

        Comment


          #19
          Just by adding "hs.speak(data)" to your last script I now have one that will read the stocks upon any event calling them.

          Now to make the original script be quiet and run on specified intervals.

          (Any suggestions for better methods appreciated.)

          Thanks,

          Brad

          Comment


            #20
            REM'ed (shows my age?)out the hs.speak parts on the original script + on some data I didn't need. Added some periods and capitalized stock names for pronunciation.

            Used Rupp's 2nd script to get data from text file to speak and WOW.

            Rupp:

            The key item in Ricks script seems to be "strstockdata" which you grab and write to a text file. I then have your 2nd script read the text file and then speak it. This works great but isn't there an easier way to do this? Just put "strstockdata" in a virtual device"? I have no idea how to do that.

            Thanks,

            Brad

            Comment


              #21
              You could write this data to a virtual device but it could become very long and virtual devices should be reserved for viewable data in my opinion.

              -Rupp
              Isn't Disney World a people trap operated by a mouse?
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #22
                Thanks for the reply.

                Used the same method on the "weather.txt" script along with some TTS formating changes. Works great - now it doesn't dial EVERY time I ask for the weather.

                This is what I've been looking for for some time. It even has me "starting" to script. (Actually cut and paste w/ small edits - gotta start somewhere.)

                Thanks again,

                Brad

                Comment


                  #23
                  Hi Rick and stock quote junkies,

                  <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> Rick
                  You would "hear" the context tags only if you are not using a SAPI 5 TTS voice, which must be the case in your situation!
                  <HR></BLOCKQUOTE>

                  To the best of my knowledge I am - am as in I am what I am not “A” “M” - using SAPI 5 TTS and the script I posted yesterday sans the context tags sounds absolutely perfect on my PC (at least I think it does). So my first question is why do the &lt;context&gt; tags speak out as “less than sign context greater than sign” and secondly why don’t I need them for my TTS engine to speak intelligently?

                  Is there such a thing as a newer version of SAPI 5 that is smart enough to not need context tags yet dumb enough not to be backward compatible?

                  Okay, so you might be thinking are you SURE you’re using 5? And my answer would be yes I am I am and here’s why: I modified the script to SpeakToFile instead of system.speak so you could hear what I hear. I noticed the help file says SpeakToFile will only work with 5 and it worked flawlessly. Actually it’s a pretty cool way to store the quotes. The script takes less than 10 seconds to get and store the five quotes but in return you get about 100 seconds of audio. By storing as a wav, the quotes can posted to a web page and then anyone can access the latest numbers at anytime. Better still, no HS cycles are needed after recording. Granted they are about 800K each but it’s still a nice option to have. SpeakToFile has so many possibilities...but I digress.

                  I also tried one other test. I went to the scripts/speech tab of event properties and tested 1:28 am in the speak the following text box. The result was “One twenty eight “A” “M.” I then tested 128 am and the result was “One hundred twenty eight am” (am as in...you know the rest)

                  So I’m not sure what I’ve got going here with my setup and why I’m different than expected. My specifics are Win2K with the latest and greatest Microsoft blunders patched and the latest and greatest for IE6. I’m running HS 1.6.150 although yesterday when it spoke fine I was still using HS 1.6.119.

                  One last question: Do you know if there is a command to detect if SAPI 4 or 5 is the current TTS? This way there would only need to be one script and the script the would be able to switch off of 4 or 5. Also the end user won’t have to worry about which script to pick. It would make it just a tad more user friendly.

                  If you would like to hear what I hear, I’ve attached the wav file for a Microsoft quote. The other file in the zip is a modified stock script that when run just writes the quotes out to wav but doesn’t do any yapping. The wavs will be stored as hs.getAppPath\temp\stockname.wav (the same directory as Rupp’s text quotes). The recorded quotes sound a little staticy. The live talking version is clear. I wonder if the bit rate is lower with SpeakToFile or if my sound card/settings are jacked.

                  Enough yapping from me.

                  hs.Joe.StopSpeaking

                  Couldn't upload 800K wav file - too big.
                  Attached an 8 bit low quality instead.

                  Joe
                  HomeSeer Rocks!

                  [This message was edited by Joe's Place on Fri, 31 October 2003 at 04:43 AM.]
                  Attached Files

                  Comment


                    #24
                    Joe,

                    It could be that the particular implementation of TTS that you have does not support all of the context tags set out by the API.

                    What specific voice name are you using as it appears in the drop down?

                    If you are using the context tag that I put in the stock script, then we need to look further. If you added it, then perhaps there is a syntax error in how you added it.

                    I need more info as I don't have an answer at this time.


                    Regards,

                    Rick Tinker
                    HomeSeer Technologies

                    Regards,

                    Rick Tinker (a.k.a. "Tink")

                    Comment


                      #25
                      Rick,

                      1) Voice in HS drop down = “ATT 1.3 DTNV mike16.”

                      2) Voice in Control Panel = “ATT DTNV 1.3 Mike16”

                      3) I used your original script as is. I neither added nor modified context tags.

                      To reiterate:

                      1) My voice speaks correctly without the context tags. $1.98 = “One dollar and ninety eight cents”

                      2) If I do use the context tags you supplied then &lt;Context&gt; = “less than sign context greater than sign”

                      Cheers,

                      Joe
                      HomeSeer Rocks!

                      Comment


                        #26
                        Joe,

                        Sorry to tell you this, but you do not have the SAPI 5 voices selected.

                        Look at the enclosed file for a picture of what you should see in the front of the TTS name...


                        Regards,

                        Rick Tinker
                        HomeSeer Technologies

                        Attached Files
                        Regards,

                        Rick Tinker (a.k.a. "Tink")

                        Comment


                          #27
                          Rick,

                          I don't see an attachement. But I know there is supposed to be a [v5] by the name. I can select that too with the same results. Also why would SpeakToFile work if I didn't have SAPI 5 running? The HS help file says that only works with 5. Also why would my speaking be perfect?

                          Joe
                          HomeSeer Rocks!

                          Comment


                            #28
                            Rick,

                            I'm very very sorry to waste your time. I selected the [v5] version again and it DOES work with the context tags. I was positive I tried it before but obviously not.

                            I don't understand why if I had SAPI 4 actually running then why the SpeakToFile works with the voice that wasn't [v5]. Unless the HS help file is wrong.

                            And if I did have 4 running then why does my voice pronounce EXACTLY like [v5] without the need for context tags?

                            Don't bother wasting anymore time with me on this one.

                            Very sorry again,

                            Joe
                            HomeSeer Rocks!

                            Comment


                              #29
                              Some services use $ signs in front of their indices. Example $INDU = Dow Jones Industrial Average.

                              GLT

                              Comment


                                #30
                                Thanks for the kind words. It does work pretty well... provided you're "on the stick" with dates. I was in the middle of a beta test for SmartHome and was not using HS for the first 3 weeks of 2004, so I did not notice that my hacked horoscope script was rendered dysfunctional by that annual date changing thing called New Years. You can download the newest version here... or simply bring the script up in a text editor and change all the entries for 2003 to 2004 (duh).

                                Happy NY All

                                When I die, I'd like to go quietly in my sleep, like my grandfather. Not affraid and screaming like the other people in the car he was driving.
                                Attached Files

                                Comment

                                Working...
                                X