Vera TTS and negative temperatures
-
Hi all. Well winter is coming and temperatures are below freezing. I currently have this snippet of Lua:
local GardenTemp = math.floor(0.5+luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 20415)) luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text="The temperature outside is" ..GardenTemp.. "degrees.",Volume=40,GroupZones="Everywhere"}, 22)
When we turn the house on. Anyone help me to get it to say 'negative' or 'minus' when the temperature is actually sub-zero?
TIA
C
-
I have been getting negative numbers without any problem. It depends on the TTS engine you are using. MacOS reads "minus". What issues are you seeing?
@rafale77 said in Vera TTS and negative temperatures:
I have been getting negative numbers without any problem. It depends on the TTS engine you are using. MacOS reads "minus". What issues are you seeing?
Ahh sorry this is the Alexa TTS. We just get the number.
C
-
So
local GardenTemp = math.floor(0.5+luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 20415)) GardenTemp = tonumber(GardenTemp) if (GardenTemp < 0) then GardenTemp = "minus " .. (-GardenTemp) end luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text="The temperature outside is" ..GardenTemp.. "degrees.",Volume=40,GroupZones="Everywhere"}, 22)
TIA
C
-
hey @CatmanV2 just use announcements (see readme). Plus, they've recently released a new conversational voice that's more natural. Just use this:
luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text='<lang xml:lang="en-UK"><amazon:domain name="conversational">The temperature outside is ' ..GardenTemp.. ' degrees.</amazon:domain></lang>',Volume=40,GroupZones="Everywhere"}, 22)
This conversational voice is able to read numbers, puntuaction and others things waaayyy better. Try it and let me know
-
hey @CatmanV2 just use announcements (see readme). Plus, they've recently released a new conversational voice that's more natural. Just use this:
luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text='<lang xml:lang="en-UK"><amazon:domain name="conversational">The temperature outside is ' ..GardenTemp.. ' degrees.</amazon:domain></lang>',Volume=40,GroupZones="Everywhere"}, 22)
This conversational voice is able to read numbers, puntuaction and others things waaayyy better. Try it and let me know
@therealdb said in Vera TTS and negative temperatures:
hey @CatmanV2 just use announcements (see readme). Plus, they've recently released a new conversational voice that's more natural. Just use this:
luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text='<lang xml:lang="en-UK"><amazon:domain name="conversational">The temperature outside is ' ..GardenTemp.. ' degrees.</amazon:domain></lang>',Volume=40,GroupZones="Everywhere"}, 22)
This conversational voice is able to read numbers, puntuaction and others things waaayyy better. Try it and let me know
Thanks, annoyingly AlexaTTS is currently non-functional for me. Not quite sure why. I assumed cookie expiration, but it's forced me to change my password and the new cookie does not appear to work.
But nothing showing in the logsC