Announcement

Collapse
No announcement yet.

Script TTS Pronounciation

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

    #31
    Originally posted by rprade View Post
    No, but you would use it in the suggestion Michael gave you in post #19, putting the string in x. Instead of:

    x = "Good "& TimeOfDay() & ".. The time is " & myTime() & "..It is" & WeekdayName(DatePart("w", Date)) & MonthName(DatePart("m", Date))& ",,the" & myday() & "," & "and the current outside temperature is " & hs.DeviceString(408) & "but it feels like " & hs.DeviceString(418)

    It would be:

    x = "Good "& TimeOfDay() & ".. The time is " & myTime() & "..It is" & WeekdayName(DatePart("w", Date)) & MonthName(DatePart("m", Date))& ",,the" & myday() & "," & "and the current outside temperature is " & hs.ReplaceVariables("$$DSR:408:") & "but it feels like " & hs.ReplaceVariables("$$DSR:418:")

    Then after putting the string in x you would process x with:

    x = Replace(x,"-","minus ")

    then hs.speak (x, True, "Control:Livingroom")

    Hopefully this makes sense - as I wrote above my scripting skills are at best, weak.

    I think the original problem stemmed from the fact that HS2 allowed the direct use of replacement variables in scripting, but HS3 doesn't.

    If you want to post the whole script this snippet was from:
    Code:
    sub main()
    	Dim a
    	Dim b
    	Dim c
    	Dim d
          Dim x
    x = Replace(x,"-","minus ") 
    hs.speak "Good "& TimeOfDay() & ".. The time is " & myTime() & "..It is" & WeekdayName(DatePart("w", Date)) & MonthName(DatePart("m", Date))& ",,the" &  myday() & "," & "and the current outside temperature is $$Dsr:408:.." & "," & "but it feels like $$Dsr:418: ..",TRUE,"Control:Livingroom"
    we can probably fix it.
    Sorry for long time replying, needed temperature to drop below zero to test. You better believe me temperature has dropped and your script works perfectly. Many many thanks all of you.
    sigpic
    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
    HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
    BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
    BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

    Comment

    Working...
    X