I'm actually still hacking around on the code and thought why not throw all of the stuff into variables, then maybe add an "advanced" mode setting or something where a user could just type in the format that they want, such as
"{alertprefix}. {alertseverity} weather alert. Certainty is {alertcertainty}. Urgency is {alerturgency}. {alertheadline}. {alertinstruction}. This is the end of the weather announcement."
It would take setting the following in the refresh(), adding an advanced mode that allowed you to type what alertmsg should be (perhaps showing the available variables, then also in refresh() adding additional alertmsg.replaceAll's to translate alertprefix, alertseverity, etc to what the NWS alert says.
alertareadescription = response.data.features[0].properties.areaDesc
alertsent = response.data.features[0].properties.sent
alerteffective = response.data.features[0].properties.effective
alertexpires = response.data.features[0].properties.expires
alertstatus = response.data.features[0].properties.status
alertmessagetype = response.data.features[0].properties.messagetype
alertcategory = response.data.features[0].properties.category
alertseverity = response.data.features[0].properties.severity
alertcertainty = response.data.features[0].properties.certainty
alerturgency = response.data.features[0].properties.urgency
alertevent = response.data.features[0].properties.event
alertsendername = response.data.features[0].properties.sendername
alertheadline = response.data.features[0].properties.headline
alertdescription = response.data.features[0].properties.description
alertinstruction = response.data.features[0].properties.instruction
alertresponse = response.data.features[0].properties.response
Edit:
replace's to set before sending for notification/speech:
alertmsg = alertmsg.replace("{alertareadescription}","${alertareadescription}")
alertmsg = alertmsg.replace("{alertsent}","${alertsent}")
alertmsg = alertmsg.replace("{alerteffective}","${alerteffective}")
alertmsg = alertmsg.replace("{alertexpires}","${alertexpires}")
alertmsg = alertmsg.replace("{alertstatus}","${alertstatus}")
alertmsg = alertmsg.replace("{alertmessagetype}","${alertmessagetype}")
alertmsg = alertmsg.replace("{alertcategory}","${alertcategory}")
alertmsg = alertmsg.replace("{alertseverity}","${alertseverity}")
alertmsg = alertmsg.replace("{alertcertainty}","${alertcertainty}")
alertmsg = alertmsg.replace("{alerturgency}","${alerturgency}")
alertmsg = alertmsg.replace("{alertevent}","${alertevent}")
alertmsg = alertmsg.replace("{alertsendername}","${alertsendername}")
alertmsg = alertmsg.replace("{alertheadline}","${alertheadline}")
alertmsg = alertmsg.replace("{alertdescription}","${alertdescription}")
alertmsg = alertmsg.replace("{alertinstruction}","${alertinstruction}")
alertmsg = alertmsg.replace("{alertresponse}","${alertresponse}")
alertmsg = alertmsg.replace(" CST","")
alertmsg = alertmsg.replace(" CDT","")
alertmsg = alertmsg.replace(" MDT","")
alertmsg = alertmsg.replace(" MST","")
alertmsg = alertmsg.replace(" PST","")
alertmsg = alertmsg.replace(" PDT","")
alertmsg = alertmsg.replace(" EST","")
alertmsg = alertmsg.replace(" EDT","")
alertmsg = alertmsg.replace(" NWS "," the national weather service ")
alertmsg = alertmsg.replaceAll("\n"," ")
state.alertmsg = alertmsg