test scripts

Script Test

this is a test test test

test 

A Test

Script: "A Test"
Variable: intent = "what is the weather"
Neon Speak: "It is currently {skill("what is the weather", weather)}"
Exit

Apple Navigator

Script: "Apple Navigator"
Author: Neongecko
Variable: options = table_scrape(https://apple.com)
Variable: chosen = ""
Neon speak: "Please tell me what apple.com web page you'd like to see. You can say things like {random(options)} or say quit or exit."
LOOP WN
....voice_input(chosen)
....# Neon speak: "navigating to {chosen}"
....if {chosen} == "quit":
........Neon speak: "say pause to turn off the mic or say exit to close the window."
........voice_input(chosen)
........if {chosen} == "pause":
............# execute skill to turn off mic
............Execute: "neon mute microphone"
....else:
........if closest(chosen,options):
............Execute: "neon browse to {closest(chosen,options)}"
........else:
............Neon speak: "Page not found"
........Neon speak: "Tell me another Apple web page you'd like to see or say quit."
LOOP WN END
Exit

Basic Execute

Script: "Basic Execute"
Neon speak: "Lets get started."
Execute: "What time is it"
Neon speak: "I'm finished."
Exit

Betsy

Script: "Betsy"
Variable: name
Variable: more
Name Speak: Betsy, "Welcome to the Neongecko Intro, My name is Betsy."
Name Speak: Betsy, "What is your name?"
voice_input(name)
Name Speak: Betsy, "hi {name}"
Name Speak: Betsy, " I am good at math. You can ask me questions like what is the log base 10 of 1 million"
Name Speak: Betsy, "After this start up script exits, if your microphone and speakers are enabled, you can ask me questions out loud and hear my answers. Otherwise you can type questions in the dialog box above."
EXIT

Cate

Script: "Cate"
Variable: name
Variable: more
Language: en-in, female
Name Speak: Cate, "Welcome to the Neongecko Intro, My name is Cate."
Name Speak: Cate, "What is your name?"
voice_input(name)
Name Speak: Cate, "hi {name}"
Name Speak: Cate, " I am a caffeine wiz! You can ask me the caffeine content of most popular USA drinks and boosters" 
Name Speak: Cate, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits."
Exit

Convert Demo

Script: "Convert Demo"
Language: en-us, female
Variable: quantity
Variable: from_units
Variable: to_units
Variable: selected
Variable: conversions = weight, volume, length, time, currency
Neon speak: "Say convert {select_one(conversions)} to convert or exit when done"
voice_input(selected,conversions)
Neon speak: "How many units would you like to convert?"
voice_input(quantity)
Neon speak: "What are the units to convert from?"
voice_input(from_units)
Neon speak: "What are the units to convert to?"
voice_input(to_units)
Execute: "how many {to_units} are in {quantity} {from_units}"
Exit

Covid 19

Script: "Covid 19" Language: "en-us male" @restartCovidScreening Name Speak: Robbie, "Version 20200709 17:40 Demo Covid-19 Screening Application" Variable: userName Variable: covidUserRef Variable: covidIll Variable: covidAge Variable: covidLifeThreat Variable: covidContact Variable: covidFever Variable: covidBreath Variable: covidSevereBreath Variable: covidCough Variable: covidSevereCough Variable: covidBP Variable: covidSevereBP Variable: covidNose Variable: covidThroat Variable: covidMuscle Variable: covidTaste Variable: covidFatigue Variable: covidNausea Variable: covidLungs Variable: covidHeart Variable: covidDiabetes Variable: covidNeuroCough Variable: covidWeakImmune Variable: covidDialysis Variable: covidLiver Variable: covidObesity Variable: covidPregnancy Variable: covidComorbiditiesCount Variable: covidNursingHome Variable: covidCareGiver Variable: True = 1 Variable: False = 0 Variable: yesNoList = "yes", "no" Variable: yesList = "yes", "sure", "very", "yup", "y" Variable: noList = "no", "not", "I don't have", "nope", "n" # {ignoreList = "I'm", "a", "the", "thanks", "thank you" # Prepositions and articles to ignore .. Variable: detailsList = "details", "more details", "tell me more" Variable: userSelfRefsList = "self", "myself", "me" Variable: userElseRefsList = "else", "someone else", "friend" Name Speak: Robbie, "This demonstration is based on the CDC's guide recommendations for Covid-19 phone screening, as of June 2020, and should not be considered a CDC or medically approved application at this time." # Name Speak: Robbie : "Some text to print and not speak." #GREETING @startCovidScreening Name Speak: Robbie, "Thank you for interacting with the demonstration Neon virtual examination room and Covid-19 conversational screening application beta test." Name Speak: Robbie, "My name is Neon Robbie." Name Speak: Robbie, "What is your name?" voice_input(userName) Name Speak: Robbie, "Hi {userName} . I am glad you chose to talk with me about Covid-19 symptoms." @promptMoreAppInfo Name Speak: Robbie, "Before starting the screening, would you like more information on the Neon conversational Covid-19 demo screening application?" voice_input(moreAppInfo) #if {moreAppInfo} !IN {yesNoList[*]}: # Goto: promptMoreAppInfo #if {moreAppInfo} IN {noList[*]}: if {moreAppInfo} IN {noList[*]}: Goto: BeginScreening Name Speak: Robbie, "The Neon conversational demonstration Covid-19 screening application is based on the Center for Disease Control and Prevention recommendations for the Coronavirus Disease 2019 Telephone Response Guide. The Covid-19 screening script is available at CDC dot gov website. https://www.cdc.gov/coronavirus/2019-ncov/hcp/phone-guide/ " @BeginScreening Name Speak: Robbie, "Your beta test virtual exam room is ready." Name Speak: Robbie, "In response to screening questions you can say details to hear more details." # Name Speak: Robbie, "or you can say previous question, or start over." @promptUserRef Name Speak: Robbie, "Are you asking for help for yourself or for someone else?" voice_input(covidUserRef) if {covidUserRef} IN {detailsList[*]}: Name Speak: Robbie, "For record keeping, we need to keep track of who we interact with." Goto: promptUserRef #if {covidUserRef} == "myself": if {covidUserRef} IN {userSelfRefsList[*]}: userRef1 = "have you" userRef2 = "are you" userRef3 = "do you" userRef1C = "Have you" userRef2C = "Are you" userRef3C = "Do you" else: if {covidUserRef} IN {userElseRefsList[*]}: userRef1 = "has the person you are calling about" userRef2 = "is the person for whom you are calling" userRef3 = "does the person you are calling about" userRef1C = "Has the person you are calling about" userRef2C = "Is the person for whom you are calling" userRef3C = "Does the person you are calling about" else Name Speak: Robbie, "Sorry {userName} I didn't get that." Goto: promptUserRef Name Speak: Robbie, "Got it {userName}." #TRIAGE @promptIll Name Speak: Robbie, "This audio guide is for people who are ill. {userRef2C} ill?" # "Are you ill (or contacting on behalf of someone who is ill)?" voice_input(covidIll) if {covidIll} IN {detailsList[*]}: Name Speak: Robbie, "We are demonstrating CDC's Covid-19 symptom screening for people who feel ill. If you are not showing symptoms of illness, then this screening system can not help you. If you are concerned you have Covid-19 infection you should contact your care advisor, since some people who have the Covid-19 infection are non-symptomatic." Goto: promptUserRef if {covidIll} IN {noList[*]}: Name Speak: Robbie, "You're not symptomatic of Covid-19 but if you are concerned you have Covid-19 infection you should contact your care advisor." Name Speak: Robbie, "Option for additional information on Covid-19 symptoms are in progress." Goto: A-noSymptoms # TODO: This could do something other than run exit, continue prompting? Ask to start over? Ask to check other symptoms? # Exit - Only for sick people else: if {covidIll} IN {yesList[*]}: Goto: promptAge else: if {covidIll} == "start over": Goto: startCovidScreening else: Goto: promptIll @promptAge Name Speak: Robbie, "This audio guide is for people over 5. How many years old {userRef2} ?" voice_input(covidAge) if {covidAge} IN {detailsList[*]}: Name Speak: Robbie, "This demonstration of conversational Covid-19 symptom screening is for people over the age of 5. Thank you for helping test the Neon Covid-19 screener." Goto: promptAge if {covidAge} < 5: Goto: C-lessThanFive else: if {covidAge} >= 5: Goto: promptLifeThreatening else: Goto: promptAge # LIFE THREATENING @promptLifeThreatening Name Speak: Robbie, "{userRef3C} have a life-threatening emergency medical condition? Say details for details." voice_input(covidLifeThreat) if {covidLifeThreat} IN {noList[*]}: Goto: promptContact else: # if {covidLifeThreat} == "details": if {covidLifeThreat} IN {detailsList[*]}: Name Speak: Robbie, "Life-threatening emergency medical conditions include these symptoms:" Name Speak: Robbie, "Extremely difficult breathing (can't talk without gasping for air); " Name Speak: Robbie, "Blue-colored lips or face; Severe, constant dizziness or lightheadedness; " Name Speak: Robbie, "Acting confused or inability to arouse; new or worsening slurred speech;" Name Speak: Robbie, "New onset of seizures or seizures that won't stop; and " Name Speak: Robbie, "Other life-threatening emergency signs." Name Speak: Robbie, "Anyone with a life-threatening emergency should immediately call 911." Name Speak: Robbie, "Thank you for helping test the Neon Covid-19 screener." Goto: promptLifeThreatening if {covidLifeThreat} !IN {yesList[*]}: Goto: promptLifeThreatening Goto: B-call911 # SCREEN FOR SYMPTOMS @promptContact Name Speak: Robbie, "In the two weeks leading up to feeling sick {userRef1} had contact with someone who was diagnosed with COVID-19, or live in or recently visited a place where COVID-19 is spreading?" voice_input(covidContact) if {covidContact} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of known contacts to people or places that expose them to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptContact if {covidContact} IN {noList[*]}: covidContact = {False} else: if {covidContact} !IN {yesList[*]}: Goto: promptContact covidContact = {True} # SYMPTOMS @promptFever Name Speak: Robbie, "{userRef3C} have a fever or felt hot or feverish in the last two days?" voice_input(covidFever) if {covidFever} IN {detailsList[*]}: Name Speak: Robbie, "People with a fever over 100.4, and trouble breathing, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. For fever-reducing medications acetaminophen is recommended (for example Tylenol). Thank you for helping test the Neon Covid-19 screener." Goto: promptFever if {covidFever} IN {noList[*]}: covidFever = {False} else: if {covidFever} !IN {yesList[*]}: Goto: promptFever covidFever = {True} # Add - # Ask "Were you able to measure the temperature with a thermometer?" # Yes: Ask "What was the temperature and when was it measured?" # If No: Ask "Are you/they experiencing shaking, chills, or sweating? Do you/they feel very warm to the touch?" # Ask "When did the fever/feverishness start?" # Ask "Was fever-reducing medication given?" # Details: WHO recommends acetaminophen (for example Tylenol). NOT nonsteroidal anti-inflammatory drugs, NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # Details: Examples of fever-reducing medications include acetaminophen (for example Tylenol) and nonsteroidal anti-inflammatory drugs, or NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # If Yes: Ask "How long ago was the medication taken?" @promptBreath Name Speak: Robbie, "{userRef3C} have shortness of breath?" voice_input(covidBreath) if {covidBreath} IN {detailsList[*]}: Name Speak: Robbie, "People with trouble breathing and a fever over 100.4, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptBreath if {covidBreath} IN {noList[*]}: covidBreath = {False} covidSevereBreath = {False} else: if {covidBreath} !IN {yesList[*]}: Goto: promptBreath covidBreath = {True} @promptSevereBreath Name Speak: Robbie, "{userRef3C} have severe shortness of breath, such as difficulty talking or walking across the room without stopping to breath, or fainting?" voice_input(covidSevereBreath) if {covidSevereBreath} IN {yesList[*]} : covidSevereBreath = {True} Name Speak: Robbie, "People having severe shortness of breath need urgent care and should call 911 or immediately go to the emergency department." Goto: B-call911 else: if {covidSevereBreath} !IN {noList[*]}: Goto: promptSevereBreath covidSevereBreath = {False} @promptCough Name Speak: Robbie, "{userRef3C} have a cough?" voice_input(covidCough) if {covidCough} IN {detailsList[*]}: Name Speak: Robbie, "People with a cough, trouble breathing, persistent pain or pressure in the chest, and a fever over 100.4, or bluish lips or face, or new confusion, or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptCough if {covidCough} IN {noList[*]}: covidCough = {False} covidSevereCough = {False} else: if {covidCough} !IN {yesList[*]}: Goto: promptCough covidCough = {True} @promptSevereCough Name Speak: Robbie, "{userRef1C} coughed up a teaspoon of blood?" voice_input(covidSevereCough) if {covidSevereCough} IN {yesList[*]} : covidSevereCough = {True} Name Speak: Robbie, "People having severe coughing (termed hemoptysis) should go to the emergency department." Goto : D-gotoEmergency if {covidSevereCough} !IN {noList[*]}: Goto: promptSevereCough covidSevereCough = {False} @promptBP Name Speak: Robbie, "{userRef3C} have low blood pressure? Signs of low blood pressure can include cold, pale, or clammy skin; or feeling too light-headed and too weak to stand." voice_input(covidBP) if {covidBP} IN {detailsList[*]}: Name Speak: Robbie, "People with a symptom of very low blood pressure, such as new confusion or fainting or being too weak to stand, should immediately seek emergency medical care. Thank you for helping test the Neon Covid-19 screener." Goto: promptBP if {covidBP} IN {noList[*]}: covidBP = {False} covidSevereBP = {False} else: if {covidBP} !IN {yesList[*]}: Goto: promptBP covidBP = {True} @promptSevereBP Name Speak: Robbie, "{userRef3C} have severe low BP hypotension such as not being able to stand?" voice_input(covidSevereBP) if {covidSevereBP} IN {yesList[*]} : covidSevereBP = {True} Name Speak: Robbie, "People having severe low blood pressure symptoms should go to the emergency department." Goto : D-gotoEmergency if {covidSevereBP} !IN {noList[*]}: Goto: promptSevereBP covidSevereBP = {False} @promptNose Name Speak: Robbie, "{userRef3C} have a runny or stuffy nose?" voice_input(covidNose) if {covidNose} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNose if {covidNose} IN {noList[*]}: covidNose = {False} else: if {covidNose} !IN {yesList[*]}: Goto: promptNose covidNose = {True} @promptThroat Name Speak: Robbie, "{userRef3C} have a sore throat?" voice_input(covidThroat) if {covidThroat} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptThroat if {covidThroat} IN {noList[*]}: covidThroat = {False} else: if {covidThroat} !IN {yesList[*]}: Goto: promptThroat covidThroat = {True} @promptMuscle Name Speak: Robbie, "{userRef3C} have muscle aches or pains?" voice_input(covidMuscle) if {covidMuscle} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptMuscle if {covidMuscle} IN {noList[*]}: covidMuscle = {False} else: if {covidMuscle} !IN {yesList[*]}: Goto: promptMuscle covidMuscle = {True} @promptTaste Name Speak: Robbie, "{userRef3C} have a new loss of taste or smell?" voice_input(covidTaste) if {covidTaste} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptTaste if {covidTaste} IN {noList[*]}: covidTaste = {False} else: if {covidTaste} !IN {yesList[*]}: Goto: promptTaste covidTaste = {True} @promptFatigue Name Speak: Robbie, "{userRef3C} have unusual tiredness, fatigue or malaise?" voice_input(covidFatigue) if {covidFatigue} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptFatigue if {covidFatigue} IN {noList[*]}: covidFatigue = {False} else: if {covidFatigue} !IN {yesList[*]}: Goto: promptFatigue covidFatigue = {True} @promptNausea Name Speak: Robbie, "{userRef3C} have nausea, vomiting, or diarrhea" voice_input(covidNausea) if {covidNausea} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNausea if {covidNausea} IN {noList[*]}: covidNausea = {False} else: if {covidNausea} !IN {yesList[*]}: Goto: promptNausea covidNausea = {True} #HIGH RISK Name Speak: Robbie, "I am now going to ask questions about ongoing medical conditions including pregnancy." @promptLungs Name Speak: Robbie, "{userRef3C} have chronic lung diseases?" # Details: "like asthma, chronic obstructive pulmonary disease [chronic bronchitis or emphysema], or other chronic conditions associated with impaired lung function or that require home oxygen?" voice_input(covidLungs) if {covidLungs} IN {detailsList[*]}: Name Speak: Robbie, "Chronic lung diseases include asthma, chronic obstructive pulmonary disease, chronic bronchitis or emphysema, or other chronic conditions associated with impaired lung function or that require home oxygen. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLungs if {covidLungs} IN {noList[*]}: covidLungs = {False} else: if {covidLungs} !IN {yesList[*]}: Goto: promptLungs covidLungs = {True} @promptHeart Name Speak: Robbie, "{userRef3C} have congestive heart failure?" voice_input(covidHeart) if {covidHeart} IN {detailsList[*]}: Name Speak: Robbie, "Congestive heart failure includes coronary artery blockage, heart attack, valve disease or congenital heart disease, and resulting in the heart not being able to pump efficiently and reduced blood flow. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptHeart if {covidHeart} IN {noList[*]}: covidHeart = {False} else: if {covidHeart} !IN {yesList[*]}: Goto: promptHeart covidHeart = {True} @promptDiabetes Name Speak: Robbie, "{userRef3C} have diabetes with complications?" # Details: "like limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially if they have uncontrolled diabetes or other complications?" voice_input(covidDiabetes) if {covidDiabetes} IN {detailsList[*]}: Name Speak: Robbie, "Complications of diabetes include limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially uncontrolled diabetes or other complications. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptDiabetes if {covidDiabetes} IN {noList[*]}: covidDiabetes = {False} else: if {covidDiabetes} !IN {yesList[*]}: Goto: promptDiabetes covidDiabetes = {True} @promptNeuroCough Name Speak: Robbie, "{userRef3C} have neurological conditions that weaken ability to cough?" # Details: "like disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury voice_input(covidNeuroCough) if {covidNeuroCough} IN {detailsList[*]}: Name Speak: Robbie, "Neurological conditions that weaken ability to cough include disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNeuroCough if {covidNeuroCough} IN {noList[*]}: covidNeuroCough = {False} else: if {covidNeuroCough} !IN {yesList[*]}: Goto: promptNeuroCough covidNeuroCough = {True} @promptWeakImmune Name Speak: Robbie, "{userRef3C} have a weakened immune system?" voice_input(covidWeakImmune) if {covidWeakImmune} IN {detailsList[*]}: Name Speak: Robbie, "A weakened immune system includes seeing a doctor for cancer and treatment such as chemotherapy or radiation, receiving an organ or bone marrow transplant, taking high doses of oral steroids or other immunosuppressant medications, HIV or AIDS. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptWeakImmune if {covidWeakImmune} IN {noList[*]}: covidWeakImmune = {False} else: if {covidWeakImmune} !IN {yesList[*]}: Goto: promptImmune covidWeakImmune = {True} @promptDialysis Name Speak: Robbie, "{userRef3C} have dialysis or under treatment for a kidney disease?" voice_input(covidDialysis) if {covidDialysis} IN {detailsList[*]}: Name Speak: Robbie, "Dialysis includes any type of dialysis, and kidney diseases are not specified in the CDC guide recommendations. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptDialysis if {covidDialysis} IN {noList[*]}: covidDialysis = {False} else: if {covidDialysis} !IN {yesList[*]}: Goto: promptDialysis covidDialysis = {True} @promptLiver Name Speak: Robbie, "{userRef3C} have cirrhosis of the liver, chronic hepatitis or other liver disease?" voice_input(covidLiver) if {covidLiver} IN {detailsList[*]}: Name Speak: Robbie, "Liver disease includes cirrhosis of the liver, chronic hepatitis or other liver disease, not are not specified in the CDC Covid-19 screening guide recommendations. Additional details in progress. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLiver if {covidLiver} IN {noList[*]}: covidLiver = {False} else: if {covidLiver} !IN {yesList[*]}: Goto: promptLiver covidLiver = {True} @promptObesity Name Speak: Robbie, "{userRef3C} have extreme obesity?" voice_input(covidObesity) if {covidObesity} IN {detailsList[*]}: Name Speak: Robbie, "Extreme obesity is Body Mass Index [BMI] greater than or equal to 40. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptObesity if {covidObesity} IN {noList[*]}: covidObesity = {False} else: if {covidObesity} !IN {yesList[*]}: Goto: promptObesity covidObesity = {True} @promptPregnancy Name Speak: Robbie, "{userRef3C} have a current pregnancy or pregnant in the last 2 weeks?" voice_input(covidPregnancy) if {covidPregnancy} IN {detailsList[*]}: Name Speak: Robbie, "Pregnancy and recent pregnancy are considered ongoing medical conditions in the CDC Covid-19 screening guide. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptPregnancy if {covidPregnancy} IN {noList[*]}: covidPregnancy = {False} else: if {covidPregnancy} !IN {yesList[*]}: Goto: promptPregnancy covidPregnancy = {True} # CALCULATE COMORBIDITIES AND ADVERSE RISKS Python: covidComorbiditiesCount = {covidLungs} + {covidHeart} + {covidDiabetes} + {covidNeuroCough} + {covidDialysis} + {covidLiver} + {covidObesity} + {covidPregnancy} if {covidComorbiditiesCount} >0 : Name Speak: Robbie, "Important! You've reported significant underlying medical conditions and illness symptoms you are advised to contact a care provider and be seen within 24 hours." # Add - Collect details? .. If history appears unreliable: Screen for other medical conditions. "Please tell me about any medicine that you/sick person take(s) daily or regularly." Ask about current medications that might indicate underlying chronic conditions. # CHECK IF CAREGIVER OR LIVING IN FACILITY @promptNursingHome Name Speak: Robbie, "{userRef3C} live in a nursing home or other long-term care facility?" voice_input(covidNursingHome) if {covidNursingHome} IN {noList[*]}: covidNursingHome = {False} else: if {covidNursingHome} !IN {yesList[*]}: Goto: promptNursingHome covidNursingHome = {True} covidCareGiver = {False} Name Speak: Robbie, "It is important that you immediately report these symptoms to your nursing home or care facility immediately, including shortness of breath, fever or cough." Goto: G-careFacilityReport @promptCareGiver Name Speak: Robbie, "{userRef3C} been involved as a worker, student or volunteer at a health care setting in the last two weeks?" # Details: in the last two weeks worked or volunteered in a hospital, emergency room, clinic, medical office, ambulance service, first responder services, or any health care setting, or taken care of patients as a student as a part of your/their work? voice_input(covidCareGiver) if {covidCareGiver} IN {noList[*]}: covidCareGiver = {False} else: if {covidCareGiver} !IN {yesList[*]}: Goto: promptCareGiver covidCareGiver = {True} Name Speak: Robbie, "It is important that you immediately report your symptoms to the occupational health provider for the care facility where you were involved, including shortness of breath, fever or respiratory symptoms." Goto: F-careGiverReport # List Symptoms, Comorbidities & Risks Name Speak: Robbie, "Would you like me to list your information including Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: checkDispositions Name Speak: Robbie, "I will list your information. Would you like me to read out loud?" voice_input(userInput) if {userInput} IN {noList[*]}: varNoSpeak = "" else varNoSpeak = "" varProsody = "rate='x-fast'" Name Speak: Robbie, "{varNoSpeak} User Name {userName} " Name Speak: Robbie, "{varNoSpeak} User Ref {covidUserRef} " Name Speak: Robbie, "{varNoSpeak} User Ill {covidIll} " Name Speak: Robbie, "{varNoSpeak} User Age {covidAge} " Name Speak: Robbie, "{varNoSpeak} Life Threat {covidLifeThreat} " Name Speak: Robbie, "{varNoSpeak} Contact {covidContact} " Name Speak: Robbie, "{varNoSpeak} Fever {covidFever} " Name Speak: Robbie, "{varNoSpeak} Breathing {covidBreath} " Name Speak: Robbie, "{varNoSpeak} Severe Breathing {covidSevereBreath} " Name Speak: Robbie, "{varNoSpeak} Cough {covidCough} " Name Speak: Robbie, "{varNoSpeak} Severe Cough {covidSevereCough} " Name Speak: Robbie, "{varNoSpeak} BP {covidBP} " Name Speak: Robbie, "{varNoSpeak} Severe BP {covidSevereBP} " Name Speak: Robbie, "{varNoSpeak} Nose {covidNose} " Name Speak: Robbie, "{varNoSpeak} Throat {covidThroat} " Name Speak: Robbie, "{varNoSpeak} Muscle {covidMuscle} " Name Speak: Robbie, "{varNoSpeak} Taste {covidTaste} " Name Speak: Robbie, "{varNoSpeak} Fatigue {covidFatigue} " Name Speak: Robbie, "{varNoSpeak} Nausea {covidNausea} " Name Speak: Robbie, "{varNoSpeak} Comorbidities " Name Speak: Robbie, "{varNoSpeak} Lungs {covidLungs} " Name Speak: Robbie, "{varNoSpeak} Heart {covidHeart} " Name Speak: Robbie, "{varNoSpeak} Diabetes {covidDiabetes} " Name Speak: Robbie, "{varNoSpeak} Neuro Cough {covidNeuroCough} " Name Speak: Robbie, "{varNoSpeak} Weakened Immune {covidWeakImmune} " Name Speak: Robbie, "{varNoSpeak} Dialysis {covidDialysis} " Name Speak: Robbie, "{varNoSpeak} Liver {covidLiver} " Name Speak: Robbie, "{varNoSpeak} Obesity {covidObesity} " Name Speak: Robbie, "{varNoSpeak} Pregnancy {covidPregnancy} " Name Speak: Robbie, "{varNoSpeak} Comorbidities Total {covidComorbiditiesCount} " Name Speak: Robbie, "{varNoSpeak} Nursing Home or Facility {covidNursingHome} " Name Speak: Robbie, "{varNoSpeak} Care Giving {covidCareGiver} " @checkDispositions Name Speak: Robbie, "Neon AI test - Checking for Dispositions for the reported symptoms." # CALCULATE D-gotoEmergency DISPOSITION Python: covidEmergencyCount = {covidSevereBreath} + {covidSevereCough} + {covidSevereBP} if {covidEmergencyCount} >0 : Name Speak: Robbie, "People with these severe symptoms are advised to immediately go to the Emergency Department." Goto: D-gotoEmergency # CALCULATE E-callMedicalProvider DISPOSITION # TODO: '*' is not a valid character Python: covidProvider24Count = {covidBreath} + ( {covidFever} * {covidComorbiditiesCount} ) + ( {covidCough} * {covidComorbiditiesCount} ) if {covidProvider24Count} >0 : Name Speak: Robbie, "People with the reported symptoms are advised to call a medical provider within 24 hours, and are encouraged to participate in tele-health options from their health care provider." Goto: E-callMedicalProvider # CALCULATE BREATHING DISPOSITIONS if {covidBreath}: if {covidComorbiditiesCount} >= 1: Goto: B-call911 Goto: D-gotoEmergency # CALCULATE H-selfCare DISPOSITION Python: covidStayHomeCount = {covidFever} + {covidFever} + {covidCough} if {covidStayHomeCount} >0 : Name Speak: Robbie, "People with the reported symptoms are advised to stay home and call their health care provider if they get worse, and are encouraged to participate in tele-health options from their health care provider." Goto: H-selfCare # TODO: Goto line here to catch no response, different response for completion vs not ill DM # NO SYMPTOMS - A @A-noSymptoms Name Speak: Robbie, "The Neon AI triage service is intended for people who are ill or caring for someone who is ill. For general information about coronavirus disease 2019 (COVID-19), please refer to the Centers for Disease Control and Prevention (CDC) website. Do you have something to write with? The CDCs website is www.cdc.gov/COVID19." Goto: promptCreateReport #CALL 911 - B @B-call911 Name Speak: Robbie, "Immediate medical attention is needed. You need to call 911 now. Tell the 911 operator if you have been in contact with someone with COVID-19 or if you have recently been to an area where COVID-19 is spreading." Goto: promptCreateReport #CHILD LESS THAN 5 YEARS OLD - C @C-lessThanFive Name Speak: Robbie, "This triage line is intended for children who are at least five years old and adults. If your child is younger than five years old and is sick, please contact their medical provider as soon as possible. If your child has had contact with a person who is sick with COVID-19 or has been in an area with community spread of COVID-19, please let their medical providers know." Goto: promptCreateReport #GO TO EMERGENCY DEPARTMENT - D @D-gotoEmergency Name Speak: Robbie, "Urgent medical attention is needed. You need to go to your nearest emergency department. If you have had contact with a person who is sick with COVID-19 or you have been in an area with community spread of COVID-19, please let your medical providers know as soon as you arrive at the emergency department." Goto: promptCreateReport #CONTACT MEDICAL PROVIDER WITHIN 24 HOURS - E @E-gotoMedicalProvider Name Speak: Robbie, "You have some symptoms that may be related to COVID-19. Stay home except to get medical care. Separate yourself from others in your home. Wear a facemask, if possible. Clean your hands often. Avoid sharing personal household items. Clean all high-touch surfaces everyday. Monitor your symptoms and seek prompt medical attention if your illness is worsening." Goto: promptCreateReport #CONTACT OCCUPATIONAL HEALTH PROVIDER AT WORK - F @F-careGiverReport Name Speak: Robbie, "Contact an occupational health provider in your healthcare facility as soon as possible. If you have cared for a person who is sick with COVID-19 or have been in an area with community spread of COVID-19, please let your occupational health provider know as soon as you speak with them." Goto: promptCreateReport #CONTACT HEALTHCARE PROVIDER IN LONG TERM CARE FACILITY - G @G-careFacilityReport Name Speak: Robbie, "You may be at higher risk for severe illness since you live in a nursing home or a long-term care facility. Tell a caregiver at the facility that you are sick and need to see a medical provider as soon as possible." Goto: promptCreateReport #STAY HOME AND TAKE CARE OF YOURSELF. CONTACT PROVIDER IF THINGS GET WORSE - H @H-selfCare Name Speak: Robbie, "Sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # Not Done Yet - Z @Z-inProgress Name Speak: Robbie, "I'm sorry {userName} I'm not programmed for that answer yet. I'm sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # CREATE REPORT @promptCreateReport Name Speak: Robbie, "Would you like me to send you an email with the information you have reported today, including User info, Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: screeningComplete Variable: screeningReport screeningReport = "User Name {userName} " screeningReport = "{screeningReport}, User Ref {covidUserRef} " screeningReport = "{screeningReport}, Ill {covidIll} " screeningReport = "{screeningReport}, Age {covidAge} " screeningReport = "{screeningReport}, Life Threat {covidLifeThreat} " screeningReport = "{screeningReport}, Contact {covidContact} " screeningReport = "{screeningReport} \nSymptoms \n" screeningReport = "{screeningReport}Fever {covidFever} " screeningReport = "{screeningReport}, Breathing {covidBreath} " screeningReport = "{screeningReport}, Severe Breathing {covidSevereBreath} " screeningReport = "{screeningReport}, Cough {covidCough} " screeningReport = "{screeningReport}, Severe Cough {covidSevereCough} " screeningReport = "{screeningReport}, BP {covidBP} " screeningReport = "{screeningReport}, Severe BP {covidSevereBP} " screeningReport = "{screeningReport}, Nose {covidNose} " screeningReport = "{screeningReport}, Throat {covidThroat} " screeningReport = "{screeningReport}, Muscle {covidMuscle} " screeningReport = "{screeningReport}, Taste {covidTaste} " screeningReport = "{screeningReport}, Fatigue {covidFatigue} " screeningReport = "{screeningReport}, Nausea {covidNausea} " screeningReport = "{screeningReport} \nComorbidities \n" screeningReport = "{screeningReport}Lungs {covidLungs} " screeningReport = "{screeningReport}, Heart {covidHeart} " screeningReport = "{screeningReport}, Diabetes {covidDiabetes} " screeningReport = "{screeningReport}, Neuro Cough {covidNeuroCough} " screeningReport = "{screeningReport}, Weakened Immune {covidWeakImmune} " screeningReport = "{screeningReport}, Dialysis {covidDialysis} " screeningReport = "{screeningReport}, Liver {covidLiver} " screeningReport = "{screeningReport}, Obesity {covidObesity} " screeningReport = "{screeningReport}, Pregnancy {covidPregnancy} " screeningReport = "{screeningReport} \nComorbidities Total {covidComorbiditiesCount} \n" screeningReport = "{screeningReport}Nursing Home or Facility {covidNursingHome} " screeningReport = "{screeningReport}, Care Giving {covidCareGiver} " Name Speak: Robbie, "This is your Screening Report {screeningReport}" Name Speak: Robbie, "Report ready to email. Say cancel to not send the email, or say send to send." voice_input(userInput) if {userInput} == "cancel": Goto: screeningComplete Email: "Neon COVID Screening Report", screeningReport @screeningComplete Name Speak: Robbie, "Would you like to restart the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList}: Name Speak: Robbie, "Would you like to erase all your answers before restarting the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList[*]}: Name Speak: Robbie, "Erasing current test answers and restarting." Goto: restartCovidScreening Name Speak: Robbie, "Restarting screening test with current test answers." Goto: startCovidScreening Name Speak: Robbie, "Thank you {userName} for testing the Neon AI Conversational Covid 19 Screening Script. Robbie, signing off." Name Speak: Robbie, "Would you like to test the Neon AI Patient Assistant Script?" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Robbie, "Transferring to Pat, our Patient Assistant demonstration. Goodbye {userName}." Execute : "Run the patient assistant script" # Name Speak: Robbie,"Neon run the Patient Assistant script starting at SCRIPTENTRY" exit # Name Speak: Robbie, "Lastly, would you like to test the Neon AI Conversational Script Menu?" # voice_input(askReturnValue) # if {askReturnValue} IN {yesList[*]}: # Name Speak: Robbie, "Transferring to Otto, our Conversational Script Menu Assistant demonstration. Goodbye {userName}." # Name Speak: Robbie, "Neon run the script menu script starting at SCRIPTENTRY" # exit Name Speak: Robbie, "Thank you {userName} for helping me practice my conversational skills and letting me practice help you." exit

Covid 19 Audio

Script: "Covid 19 Audio" Language: en-us, male @restartCovidScreening Name Speak: "Robbie", "Version 20200709 17-40 Demo Covid-19 Screening Application" Variable: userName Variable: covidUserRef Variable: covidIll Variable: covidAge Variable: covidLifeThreat Variable: covidContact Variable: covidFever Variable: covidBreath Variable: covidSevereBreath Variable: covidCough Variable: covidSevereCough Variable: covidBP Variable: covidSevereBP Variable: covidNose Variable: covidThroat Variable: covidMuscle Variable: covidTaste Variable: covidFatigue Variable: covidNausea Variable: covidLungs Variable: covidHeart Variable: covidDiabetes Variable: covidNeuroCough Variable: covidWeakImmune Variable: covidDialysis Variable: covidLiver Variable: covidObesity Variable: covidPregnancy Variable: covidComorbiditiesCount Variable: covidNursingHome Variable: covidCareGiver Variable: True = 1 Variable: False = 0 Variable: yesNoList = "yes", "no" Variable: yesList = "yes", "sure", "very", "yup", "y" Variable: noList = "no", "not", "I don't have", "nope", "n" # {ignoreList} = "I'm", "a", "the", "thanks", "thank you" # Prepositions and articles to ignore .. Variable: detailsList = "details", "more details", "tell me more" Variable: userSelfRefsList = "self", "myself", "me" Variable: userElseRefsList = "else", "someone else", "friend" Name Speak: "Robbie", "This demonstration is based on the CDC's guide recommendations for Covid-19 phone screening, as of June 2020, and should not be considered a CDC or medically approved application at this time." # Name Speak: Robbie : "Some text to print and not speak." #GREETING @startCovidScreening Name Speak: "Robbie", "Thank you for interacting with the demonstration Neon virtual examination room and Covid-19 conversational screening application beta test." Name Speak: "Robbie", "My name is Neon Robbie." Name Speak: "Robbie", "What is your name?" voice_input(userName) Name Reconvey: "Robbie", "Hi {userName}", "Hi" Name Reconvey: "Robbie", "I am glad you chose to talk with me about Covid-19 symptoms." @promptMoreAppInfo Name Speak: "Robbie", "Before starting the screening, would you like more information on the Neon conversational Covid-19 demo screening application?" voice_input(moreAppInfo) #if {moreAppInfo} !IN {yesNoList[*]}: # Goto: promptMoreAppInfo #if {moreAppInfo} IN {noList[*]}: if {moreAppInfo} IN {noList[*]}: Goto: BeginScreening Name Speak: "Robbie", "The Neon conversational demonstration Covid-19 screening application is based on the Center for Disease Control and Prevention recommendations for the Coronavirus Disease 2019 Telephone Response Guide. The Covid-19 screening script is available at CDC dot gov website. https://www.cdc.gov/coronavirus/2019-ncov/hcp/phone-guide/ " @BeginScreening Name Speak: "Robbie", "Your beta test virtual exam room is ready." Name Reconvey: "Robbie", "In response to screening questions you can say details to hear more details.", "Say details for details" # Name Speak: "Robbie", "or you can say previous question, or start over." @promptUserRef Name Reconvey: "Robbie", "Are you asking for help for yourself, or for someone else?" voice_input(covidUserRef) if {covidUserRef} IN {detailsList[*]}: Name Speak: "Robbie", "For record keeping, we need to keep track of who we interact with." Goto: promptUserRef #if {covidUserRef} == "myself": if {covidUserRef} IN {userSelfRefsList[*]}: userRef1 = "have you" userRef2 = "are you" userRef3 = "do you" userRef1C = "Have you" userRef2C = "Are you" userRef3C = "Do you" else: if {covidUserRef} IN {userElseRefsList[*]}: userRef1 = "has the person you are calling about" userRef2 = "is the person for whom you are calling" userRef3 = "does the person you are calling about" userRef1C = "Has the person you are calling about" userRef2C = "Is the person for whom you are calling" userRef3C = "Does the person you are calling about" else Name Reconvey: "Robbie", "Sorry {userName} I didn't get that.", "I didn't get that." Goto: promptUserRef Name Reconvey: "Robbie", "Got it {userName}.", "Got it" #TRIAGE @promptIll # Name Speak: "Robbie", "This audio guide is for people who are ill. {userRef2C} ill?" Name Reconvey: "Robbie", "This audio guide is for people who are ill" Name Reconvey: "Robbie", "Are you ill of contacting on behalf of someone who is ill?" # "Are you ill (or contacting on behalf of someone who is ill)?" voice_input(covidIll) if {covidIll} IN {detailsList[*]}: Name Reconvey: "Robbie", "We are demonstrating CDC's Covid-19 symptom screening for people who feel ill." Name Reconvey: "Robbie", "If you are not showing symptoms of illness, then this screening system can not help you." Name Reconvey: "Robbie", "If you are concerned you have Covid-19 infection you should contact your care advisor, since some people who have the Covid-19 infection are non-symptomatic." Goto: promptUserRef if {covidIll} IN {noList[*]}: Name Speak: "Robbie", "You're not symptomatic of Covid-19 but if you are concerned you have Covid-19 infection you should contact your care advisor." Name Speak: "Robbie", "Option for additional information on Covid-19 symptoms are in progress." Goto: A-noSymptoms # TODO: This could do something other than run exit, continue prompting? Ask to start over? Ask to check other symptoms? # Exit - Only for sick people else: if {covidIll} IN {yesList[*]}: Goto: promptAge else: if {covidIll} == "start over": Goto: startCovidScreening else: Goto: promptIll @promptAge Name Reconvey: "Robbie", "This audio guide is for people over 5. How many years old are you or the person you are calling about?" voice_input(covidAge) if {covidAge} IN {detailsList[*]}: Name Speak: "Robbie", "This demonstration of conversational Covid-19 symptom screening is for people over the age of 5. Thank you for helping test the Neon Covid-19 screener." Goto: promptAge if {covidAge} < 5: Goto: C-lessThanFive else: if {covidAge} >= 5: Goto: promptLifeThreatening else: Goto: promptAge # LIFE THREATENING @promptLifeThreatening Name Speak: "Robbie", "{userRef3C} have a life-threatening emergency medical condition? Say details for details." voice_input(covidLifeThreat) if {covidLifeThreat} IN {noList[*]}: Goto: promptContact else: # if {covidLifeThreat} == "details": if {covidLifeThreat} IN {detailsList[*]}: Name Speak: "Robbie", "Life-threatening emergency medical conditions include these symptoms:" Name Speak: "Robbie", "Extremely difficult breathing (can't talk without gasping for air); " Name Speak: "Robbie", "Blue-colored lips or face; Severe, constant dizziness or lightheadedness; " Name Speak: "Robbie", "Acting confused or inability to arouse; new or worsening slurred speech;" Name Speak: "Robbie", "New onset of seizures or seizures that won't stop; and " Name Speak: "Robbie", "Other life-threatening emergency signs." Name Speak: "Robbie", "Anyone with a life-threatening emergency should immediately call 911." Name Speak: "Robbie", "Thank you for helping test the Neon Covid-19 screener." Goto: promptLifeThreatening if {covidLifeThreat} !IN {yesList[*]}: Goto: promptLifeThreatening Goto: B-call911 # SCREEN FOR SYMPTOMS @promptContact Name Speak: "Robbie", "In the two weeks leading up to feeling sick {userRef1} had contact with someone who was diagnosed with COVID-19, or live in or recently visited a place where COVID-19 is spreading?" voice_input(covidContact) if {covidContact} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of known contacts to people or places that expose them to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptContact if {covidContact} IN {noList[*]}: covidContact = {False} else: if {covidContact} !IN {yesList[*]}: Goto: promptContact covidContact = {True} # SYMPTOMS @promptFever Name Speak: "Robbie", "{userRef3C} have a fever or felt hot or feverish in the last two days?" voice_input(covidFever) if {covidFever} IN {detailsList[*]}: Name Speak: "Robbie", "People with a fever over 100.4, and trouble breathing, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. For fever-reducing medications acetaminophen is recommended (for example Tylenol). Thank you for helping test the Neon Covid-19 screener." Goto: promptFever if {covidFever} IN {noList[*]}: covidFever = {False} else: if {covidFever} !IN {yesList[*]}: Goto: promptFever covidFever = {True} # Add - # Ask "Were you able to measure the temperature with a thermometer?" # Yes: Ask "What was the temperature and when was it measured?" # If No: Ask "Are you/they experiencing shaking, chills, or sweating? Do you/they feel very warm to the touch?" # Ask "When did the fever/feverishness start?" # Ask "Was fever-reducing medication given?" # Details: WHO recommends acetaminophen (for example Tylenol). NOT nonsteroidal anti-inflammatory drugs, NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # Details: Examples of fever-reducing medications include acetaminophen (for example Tylenol) and nonsteroidal anti-inflammatory drugs, or NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # If Yes: Ask "How long ago was the medication taken?" @promptBreath # TODO: Breath Audio here Name Speak: "Robbie", "{userRef3C} have shortness of breath?" voice_input(covidBreath) if {covidBreath} IN {detailsList[*]}: Name Speak: "Robbie", "People with trouble breathing and a fever over 100.4, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptBreath if {covidBreath} IN {noList[*]}: covidBreath = {False} covidSevereBreath = {False} else: if {covidBreath} !IN {yesList[*]}: Goto: promptBreath covidBreath = {True} @promptSevereBreath # TODO: Severe Breath Audio here Name Speak: "Robbie", "{userRef3C} have severe shortness of breath, such as difficulty talking or walking across the room without stopping to breath, or fainting?" voice_input(covidSevereBreath) if {covidSevereBreath} IN {yesList[*]} : covidSevereBreath = {True) Name Speak: "Robbie", "People having severe shortness of breath need urgent care and should call 911 or immediately go to the emergency department." Goto: B-call911 else: if {covidSevereBreath} !IN {noList[*]}: Goto: promptSevereBreath covidSevereBreath = {False} @promptCough if {userRef3C} == "Do you": Name Reconvey: "Robbie", "Do you have a cough?" else: Name Reconvey: "Robbie", "Does the person you are calling about have a cough?" voice_input(covidCough) if {covidCough} IN {detailsList[*]}: Name Speak: "Robbie", "People with a cough, trouble breathing, persistent pain or pressure in the chest, and a fever over 100.4, or bluish lips or face, or new confusion, or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptCough if {covidCough} IN {noList[*]}: covidCough = {False} covidSevereCough = {False} else: if {covidCough} !IN {yesList[*]}: Goto: promptCough covidCough = {True} @promptSevereCough if {userRef1C} == "Have you": Name Reconvey: "Robbie", "Have you coughed up a teaspoon of blood?" else: Name Reconvey: "Robbie", "Has the person you are calling about coughed up a teaspoon of blood?" voice_input(covidSevereCough) if {covidSevereCough} IN {yesList[*]} : covidSevereCough = {True} Name Speak: "Robbie", "People having severe coughing (termed hemoptysis) should go to the emergency department." Goto : D-gotoEmergency if {covidSevereCough} !IN {noList[*]}: Goto: promptSevereCough covidSevereCough = {False} @promptBP # TODO: Low BP Audio here Name Speak: "Robbie", "{userRef3C} have low blood pressure? Signs of low blood pressure can include cold, pale, or clammy skin; or feeling too light-headed and too weak to stand." voice_input(covidBP) if {covidBP} IN {detailsList[*]}: Name Speak: "Robbie", "People with a symptom of very low blood pressure, such as new confusion or fainting or being too weak to stand, should immediately seek emergency medical care. Thank you for helping test the Neon Covid-19 screener." Goto: promptBP if {covidBP} IN {noList[*]}: covidBP = {False} covidSevereBP = {False} else: if {covidBP} !IN {yesList[*]}: Goto: promptBP covidBP = {True} @promptSevereBP Name Speak: "Robbie", "{userRef3C} have severe low BP hypotension such as not being able to stand?" voice_input(covidSevereBP) if {covidSevereBP} IN {yesList[*]} : covidSevereBP = {True} Name Speak: "Robbie", "People having severe low blood pressure symptoms should go to the emergency department." Goto : D-gotoEmergency if {covidSevereBP} !IN {noList[*]}: Goto: promptSevereBP covidSevereBP = {False} @promptNose Name Reconvey: "Robbie", "{userRef3C} have a runny or stuffy nose?", "Do you of the person you are calling about have a new loss of taste or smell?" voice_input(covidNose) if {covidNose} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNose if {covidNose} IN {noList[*]}: covidNose = {False} else: if {covidNose} !IN {yesList[*]}: Goto: promptNose covidNose = {True} @promptThroat Name Reconvey: "Robbie", "{userRef3C} have a sore throat?", "Do you or the person you are calling about have a sore throat?" voice_input(covidThroat) if {covidThroat} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptThroat if {covidThroat} IN {noList[*]}: covidThroat = {False} else: if {covidThroat} !IN {yesList[*]}: Goto: promptThroat covidThroat = {True} @promptMuscle Name Speak: "Robbie", "{userRef3C} have muscle aches or pains?" voice_input(covidMuscle) if {covidMuscle} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptMuscle if {covidMuscle} IN {noList[*]}: covidMuscle = {False} else: if {covidMuscle} !IN {yesList[*]}: Goto: promptMuscle covidMuscle = {True} @promptTaste Name Reconvey: "Robbie", "{userRef3C} have a new loss of taste or smell?", "Do you or the person you are calling about have a new loss of taste or smell?" voice_input(covidTaste) if {covidTaste} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptTaste if {covidTaste} IN {noList[*]}: covidTaste = {False} else: if {covidTaste} !IN {yesList[*]}: Goto: promptTaste covidTaste = {True} @promptFatigue Name Speak: "Robbie", "{userRef3C} have unusual tiredness, fatigue or malaise?" voice_input(covidFatigue) if {covidFatigue} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptFatigue if {covidFatigue} IN {noList[*]}: covidFatigue = {False} else: if {covidFatigue} !IN {yesList[*]}: Goto: promptFatigue covidFatigue = {True} @promptNausea Name Speak: "Robbie", "{userRef3C} have nausea, vomiting, or diarrhea" voice_input(covidNausea) if {covidNausea} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNausea if {covidNausea} IN {noList[*]}: covidNausea = {False} else: if {covidNausea} !IN {yesList[*]}: Goto: promptNausea covidNausea = {True} #HIGH RISK Name Speak: "Robbie", "I am now going to ask questions about ongoing medical conditions including pregnancy." @promptLungs Name Speak: "Robbie", "{userRef3C} have chronic lung diseases?" # Details: "like asthma, chronic obstructive pulmonary disease [chronic bronchitis or emphysema], or other chronic conditions associated with impaired lung function or that require home oxygen?" voice_input(covidLungs) if {covidLungs} IN {detailsList[*]}: Name Speak: "Robbie", "Chronic lung diseases include asthma, chronic obstructive pulmonary disease, chronic bronchitis or emphysema, or other chronic conditions associated with impaired lung function or that require home oxygen. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLungs if {covidLungs} IN {noList[*]}: covidLungs = {False} else: if {covidLungs} !IN {yesList[*]}: Goto: promptLungs covidLungs = {True} @promptHeart Name Speak: "Robbie", "{userRef3C} have congestive heart failure?" voice_input(covidHeart) if {covidHeart} IN {detailsList[*]}: Name Speak: "Robbie", "Congestive heart failure includes coronary artery blockage, heart attack, valve disease or congenital heart disease, and resulting in the heart not being able to pump efficiently and reduced blood flow. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptHeart if {covidHeart} IN {noList[*]}: covidHeart = {False} else: if {covidHeart} !IN {yesList[*]}: Goto: promptHeart covidHeart = {True} @promptDiabetes Name Speak: "Robbie", "{userRef3C} have diabetes with complications?" # Details: "like limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially if they have uncontrolled diabetes or other complications?" voice_input(covidDiabetes) if {covidDiabetes} IN {detailsList[*]}: Name Speak: "Robbie", "Complications of diabetes include limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially uncontrolled diabetes or other complications. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptDiabetes if {covidDiabetes} IN {noList[*]}: covidDiabetes = {False} else: if {covidDiabetes} !IN {yesList[*]}: Goto: promptDiabetes covidDiabetes = {True} @promptNeuroCough Name Speak: "Robbie", "{userRef3C} have neurological conditions that weaken ability to cough?" # Details: "like disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury voice_input(covidNeuroCough) if {covidNeuroCough} IN {detailsList[*]}: Name Speak: "Robbie", "Neurological conditions that weaken ability to cough include disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNeuroCough if {covidNeuroCough} IN {noList[*]}: covidNeuroCough = {False} else: if {covidNeuroCough} !IN {yesList[*]}: Goto: promptNeuroCough covidNeuroCough = {True} @promptWeakImmune Name Speak: "Robbie", "{userRef3C} have a weakened immune system?" voice_input(covidWeakImmune) if {covidWeakImmune} IN {detailsList[*]}: Name Speak: "Robbie", "A weakened immune system includes seeing a doctor for cancer and treatment such as chemotherapy or radiation, receiving an organ or bone marrow transplant, taking high doses of oral steroids or other immunosuppressant medications, HIV or AIDS. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptWeakImmune if {covidWeakImmune} IN {noList[*]}: covidWeakImmune = {False} else: if {covidWeakImmune} !IN {yesList[*]}: Goto: promptImmune covidWeakImmune = {True} @promptDialysis Name Speak: "Robbie", "{userRef3C} have dialysis or under treatment for a kidney disease?" voice_input(covidDialysis) if {covidDialysis} IN {detailsList[*]}: Name Speak: "Robbie", "Dialysis includes any type of dialysis, and kidney diseases are not specified in the CDC guide recommendations. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptDialysis if {covidDialysis} IN {noList[*]}: covidDialysis = {False} else: if {covidDialysis} !IN {yesList[*]}: Goto: promptDialysis covidDialysis = {True} @promptLiver Name Speak: "Robbie", "{userRef3C} have cirrhosis of the liver, chronic hepatitis or other liver disease?" voice_input(covidLiver) if {covidLiver} IN {detailsList[*]}: Name Speak: "Robbie", "Liver disease includes cirrhosis of the liver, chronic hepatitis or other liver disease, not are not specified in the CDC Covid-19 screening guide recommendations. Additional details in progress. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLiver if {covidLiver} IN {noList[*]}: covidLiver = {False} else: if {covidLiver} !IN {yesList[*]}: Goto: promptLiver covidLiver = {True} @promptObesity Name Speak: "Robbie", "{userRef3C} have extreme obesity?" voice_input(covidObesity) if {covidObesity} IN {detailsList[*]}: Name Speak: "Robbie", "Extreme obesity is Body Mass Index [BMI] greater than or equal to 40. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptObesity if {covidObesity} IN {noList[*]}: covidObesity = {False} else: if {covidObesity} !IN {yesList[*]}: Goto: promptObesity covidObesity = {True} @promptPregnancy Name Speak: "Robbie", "{userRef3C} have a current pregnancy or pregnant in the last 2 weeks?" voice_input(covidPregnancy) if {covidPregnancy} IN {detailsList[*]}: Name Speak: "Robbie", "Pregnancy and recent pregnancy are considered ongoing medical conditions in the CDC Covid-19 screening guide. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptPregnancy if {covidPregnancy} IN {noList[*]}: covidPregnancy = {False} else: if {covidPregnancy} !IN {yesList[*]}: Goto: promptPregnancy covidPregnancy = {True} # CALCULATE COMORBIDITIES AND ADVERSE RISKS Python: covidComorbiditiesCount = {covidLungs} + {covidHeart} + {covidDiabetes} + {covidNeuroCough} + {covidDialysis} + {covidLiver} + {covidObesity} + {covidPregnancy) if {covidComorbiditiesCount} >0 : Name Speak: "Robbie", "Important! You've reported significant underlying medical conditions and illness symptoms you are advised to contact a care provider and be seen within 24 hours." # Add - Collect details? .. If history appears unreliable: Screen for other medical conditions. "Please tell me about any medicine that you/sick person take(s) daily or regularly." Ask about current medications that might indicate underlying chronic conditions. # CHECK IF CAREGIVER OR LIVING IN FACILITY @promptNursingHome Name Speak: "Robbie", "{userRef3C} live in a nursing home or other long-term care facility?", "Do you or the person you are calling about live in a nursing home or other long-term care facility?" voice_input(covidNursingHome) if {covidNursingHome} IN {noList[*]}: covidNursingHome = {False} else: if {covidNursingHome} !IN {yesList[*]}: Goto: promptNursingHome covidNursingHome = {True} covidCareGiver = {False} Name Speak: "Robbie", "It is important that you immediately report these symptoms to your nursing home or care facility immediately, including shortness of breath, fever or cough." Goto: G-careFacilityReport @promptCareGiver Name Reconvey: "Robbie", "{userRef3C} been involved as a worker, student or volunteer at a health care setting in the last two weeks?", "In the last two weeks have you or the person you are calling about worked or volunteered... work?" # Details: in the last two weeks worked or volunteered in a hospital, emergency room, clinic, medical office, ambulance service, first responder services, or any health care setting, or taken care of patients as a student as a part of your/their work? voice_input(covidCareGiver) if {covidCareGiver} IN {noList[*]}: covidCareGiver = {False} else: if {covidCareGiver} !IN {yesList[*]}: Goto: promptCareGiver covidCareGiver = {True} Name Speak: "Robbie", "It is important that you immediately report your symptoms to the occupational health provider for the care facility where you were involved, including shortness of breath, fever or respiratory symptoms." Goto: F-careGiverReport # List Symptoms, Comorbidities & Risks Name Speak: "Robbie", "Would you like me to list your information including Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: checkDispositions Name Speak: "Robbie", "I will list your information. Would you like me to read out loud?" voice_input(userInput) if {userInput} IN {noList[*]}: varNoSpeak = "" else varNoSpeak = "" varProsody = "rate='x-fast'" Name Speak: "Robbie", "{varNoSpeak} User Name {userName} " Name Speak: "Robbie", "{varNoSpeak} User Ref {covidUserRef} " Name Speak: "Robbie", "{varNoSpeak} User Ill {covidIll} " Name Speak: "Robbie", "{varNoSpeak} User Age {covidAge} " Name Speak: "Robbie", "{varNoSpeak} Life Threat {covidLifeThreat} " Name Speak: "Robbie", "{varNoSpeak} Contact {covidContact} " Name Speak: "Robbie", "{varNoSpeak} Fever {covidFever} " Name Speak: "Robbie", "{varNoSpeak} Breathing {covidBreath} " Name Speak: "Robbie", "{varNoSpeak} Severe Breathing {covidSevereBreath} " Name Speak: "Robbie", "{varNoSpeak} Cough {covidCough} " Name Speak: "Robbie", "{varNoSpeak} Severe Cough {covidSevereCough} " Name Speak: "Robbie", "{varNoSpeak} BP {covidBP} " Name Speak: "Robbie", "{varNoSpeak} Severe BP {covidSevereBP} " Name Speak: "Robbie", "{varNoSpeak} Nose {covidNose} " Name Speak: "Robbie", "{varNoSpeak} Throat {covidThroat} " Name Speak: "Robbie", "{varNoSpeak} Muscle {covidMuscle} " Name Speak: "Robbie", "{varNoSpeak} Taste {covidTaste} " Name Speak: "Robbie", "{varNoSpeak} Fatigue {covidFatigue} " Name Speak: "Robbie", "{varNoSpeak} Nausea {covidNausea} " Name Speak: "Robbie", "{varNoSpeak} Comorbidities " Name Speak: "Robbie", "{varNoSpeak} Lungs {covidLungs} " Name Speak: "Robbie", "{varNoSpeak} Heart {covidHeart} " Name Speak: "Robbie", "{varNoSpeak} Diabetes {covidDiabetes} " Name Speak: "Robbie", "{varNoSpeak} Neuro Cough {covidNeuroCough} " Name Speak: "Robbie", "{varNoSpeak} Weakened Immune {covidWeakImmune} " Name Speak: "Robbie", "{varNoSpeak} Dialysis {covidDialysis} " Name Speak: "Robbie", "{varNoSpeak} Liver {covidLiver} " Name Speak: "Robbie", "{varNoSpeak} Obesity {covidObesity} " Name Speak: "Robbie", "{varNoSpeak} Pregnancy {covidPregnancy} " Name Speak: "Robbie", "{varNoSpeak} Comorbidities Total {covidComorbiditiesCount} " Name Speak: "Robbie", "{varNoSpeak} Nursing Home or Facility {covidNursingHome} " Name Speak: "Robbie", "{varNoSpeak} Care Giving {covidCareGiver} " @checkDispositions Name Speak: "Robbie", "Neon AI test - Checking for Dispositions for the reported symptoms." # CALCULATE D-gotoEmergency DISPOSITION Python: covidEmergencyCount = {covidSevereBreath} + {covidSevereCough} + {covidSevereBP} if {covidEmergencyCount} >0 : Name Speak: "Robbie", "People with these severe symptoms are advised to immediately go to the Emergency Department." Goto: D-gotoEmergency # CALCULATE E-callMedicalProvider DISPOSITION # TODO: '*' is not a valid character Python: covidProvider24Count = {covidBreath} + ( {covidFever} * {covidComorbiditiesCount} ) + ( {covidCough} * {covidComorbiditiesCount} ) if {covidProvider24Count} >0 : Name Speak: "Robbie", "People with the reported symptoms are advised to call a medical provider within 24 hours, and are encouraged to participate in tele-health options from their health care provider." Goto: E-callMedicalProvider # CALCULATE BREATHING DISPOSITIONS if {covidBreath}: if {covidComorbiditiesCount} >= 1: Goto: B-call911 Goto: D-gotoEmergency # CALCULATE H-selfCare DISPOSITION Python: covidStayHomeCount = {covidFever} + {covidFever} + {covidCough} if {covidStayHomeCount} >0 : Name Speak: "Robbie", "People with the reported symptoms are advised to stay home and call their health care provider if they get worse, and are encouraged to participate in tele-health options from their health care provider." Goto: H-selfCare # TODO: Goto line here to catch no response, different response for completion vs not ill DM # NO SYMPTOMS - A @A-noSymptoms Name Speak: "Robbie", "The Neon AI triage service is intended for people who are ill or caring for someone who is ill. For general information about coronavirus disease 2019 (COVID-19), please refer to the Centers for Disease Control and Prevention (CDC) website. Do you have something to write with? The CDCs website is www.cdc.gov/COVID19." Goto: promptCreateReport #CALL 911 - B @B-call911 Name Reconvey: "Robbie", "Immediate medical attention is needed. You need to call 911 now. Tell the 911 operator if you have been in contact with someone with COVID-19 or if you have recently been to an area where COVID-19 is spreading." Goto: promptCreateReport #CHILD LESS THAN 5 YEARS OLD - C @C-lessThanFive Name Speak: "Robbie", "This triage line is intended for children who are at least five years old and adults. If your child is younger than five years old and is sick, please contact their medical provider as soon as possible. If your child has had contact with a person who is sick with COVID-19 or has been in an area with community spread of COVID-19, please let their medical providers know." Goto: promptCreateReport #GO TO EMERGENCY DEPARTMENT - D @D-gotoEmergency Name Reconvey: "Robbie", "Urgent medical attention is needed." Name Reconvey: "Robbie", "You need to go to your nearest emergency department." Name Speak: "Robbie", If you have had contact with a person who is sick with COVID-19 or you have been in an area with community spread of COVID-19, please let your medical providers know as soon as you arrive at the emergency department." Goto: promptCreateReport #CONTACT MEDICAL PROVIDER WITHIN 24 HOURS - E @E-gotoMedicalProvider Name Reconvey: "Robbie", "You have some symptoms that may be related to COVID-19. Stay home except to get medical care. Separate yourself from others in your home. Wear a facemask, if possible. Clean your hands often. Avoid sharing personal household items. Clean all high-touch surfaces everyday. Monitor your symptoms and seek prompt medical attention if your illness is worsening.", "You have some symptoms that may be related to COVID-19... Monitor your symptoms and seek prompt medical attention if your illness is worsening." Goto: promptCreateReport #CONTACT OCCUPATIONAL HEALTH PROVIDER AT WORK - F @F-careGiverReport Name Speak: "Robbie", "Contact an occupational health provider in your healthcare facility as soon as possible. If you have cared for a person who is sick with COVID-19 or have been in an area with community spread of COVID-19, please let your occupational health provider know as soon as you speak with them." Goto: promptCreateReport #CONTACT HEALTHCARE PROVIDER IN LONG TERM CARE FACILITY - G @G-careFacilityReport Name Speak: "Robbie", "You may be at higher risk for severe illness since you live in a nursing home or a long-term care facility. Tell a caregiver at the facility that you are sick and need to see a medical provider as soon as possible." Goto: promptCreateReport #STAY HOME AND TAKE CARE OF YOURSELF. CONTACT PROVIDER IF THINGS GET WORSE - H @H-selfCare Name Speak: "Robbie", "Sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # Not Done Yet - Z @Z-inProgress Name Speak: "Robbie", "I'm sorry {userName} I'm not programmed for that answer yet. I'm sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # CREATE REPORT @promptCreateReport Name Speak: "Robbie", "Would you like me to send you an email with the information you have reported today, including User info, Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: screeningComplete Variable: screeningReport screeningReport = "User Name {userName} " screeningReport = "{screeningReport}, User Ref {covidUserRef} " screeningReport = "{screeningReport}, Ill {covidIll} " screeningReport = "{screeningReport}, Age {covidAge} " screeningReport = "{screeningReport}, Life Threat {covidLifeThreat} " screeningReport = "{screeningReport}, Contact {covidContact} " screeningReport = "{screeningReport} \nSymptoms \n" screeningReport = "{screeningReport}Fever {covidFever} " screeningReport = "{screeningReport}, Breathing {covidBreath} " screeningReport = "{screeningReport}, Severe Breathing {covidSevereBreath} " screeningReport = "{screeningReport}, Cough {covidCough} " screeningReport = "{screeningReport}, Severe Cough {covidSevereCough} " screeningReport = "{screeningReport}, BP {covidBP} " screeningReport = "{screeningReport}, Severe BP {covidSevereBP} " screeningReport = "{screeningReport}, Nose {covidNose} " screeningReport = "{screeningReport}, Throat {covidThroat} " screeningReport = "{screeningReport}, Muscle {covidMuscle} " screeningReport = "{screeningReport}, Taste {covidTaste} " screeningReport = "{screeningReport}, Fatigue {covidFatigue} " screeningReport = "{screeningReport}, Nausea {covidNausea} " screeningReport = "{screeningReport} \nComorbidities \n" screeningReport = "{screeningReport}Lungs {covidLungs} " screeningReport = "{screeningReport}, Heart {covidHeart} " screeningReport = "{screeningReport}, Diabetes {covidDiabetes} " screeningReport = "{screeningReport}, Neuro Cough {covidNeuroCough} " screeningReport = "{screeningReport}, Weakened Immune {covidWeakImmune} " screeningReport = "{screeningReport}, Dialysis {covidDialysis} " screeningReport = "{screeningReport}, Liver {covidLiver} " screeningReport = "{screeningReport}, Obesity {covidObesity} " screeningReport = "{screeningReport}, Pregnancy {covidPregnancy} " screeningReport = "{screeningReport} \nComorbidities Total {covidComorbiditiesCount} \n" screeningReport = "{screeningReport}Nursing Home or Facility {covidNursingHome} " screeningReport = "{screeningReport}, Care Giving {covidCareGiver} " Name Speak: "Robbie", "This is your Screening Report {screeningReport}" Name Speak: "Robbie", "Report ready to email. Say cancel to not send the email, or say send to send." voice_input(userInput) if {userInput} == "cancel": Goto: screeningComplete Email: "Neon COVID Screening Report", screeningReport @screeningComplete Name Speak: "Robbie", "Would you like to restart the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList}: Name Speak: "Robbie", "Would you like to erase all your answers before restarting the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList[*]}: Name Speak: "Robbie", "Erasing current test answers and restarting." Goto: restartCovidScreening Name Speak: "Robbie", "Restarting screening test with current test answers." Goto: startCovidScreening Name Speak: "Robbie", "Thank you {userName} for testing the Neon AI Conversational Covid 19 Screening Script. "Robbie", signing off." Name Speak: "Robbie", "Would you like to test the Neon AI Patient Assistant Script?" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Reconvey: "Robbie", "Transferring to Pat, our Patient Assistant demonstration. Goodbye {userName}.", "Goodbye" Execute : "Run the patient assistant script" # Name Speak : Robbie :"Neon run the Patient Assistant script starting at SCRIPTENTRY" exit # Name Speak: "Robbie", "Lastly, would you like to test the Neon AI Conversational Script Menu?" # voice_input(askReturnValue) # if {askReturnValue} IN {yesList[*]}: # Name Speak: "Robbie", "Transferring to Otto, our Conversational Script Menu Assistant demonstration. Goodbye {userName}." # Name Speak: "Robbie", "Neon run the script menu script starting at SCRIPTENTRY" # exit Name Speak: "Robbie", "Thank you {userName} for helping me practice my conversational skills and letting me practice help you." exit

Demo Guess Number Timeout

Script: "Demo Guess Number Timeout" Author: Daniel McKnight Timeout: 15 Description: Neon will select a number between 1 and 10 at random and give hints until the user guesses correctly. If there is no response for 15 seconds, the script will exit Variable: numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Variable: neon_num = random(numbers) Variable: user_guess = "" Set: neon_num = random(numbers) Neon speak: # "My number is {neon_num}" "I'm thinking of a number between 1 and 10" "Guess what it is or say 'exit'" LOOP guess voice_input{user_guess} if {user_guess} in {numbers}: if {user_guess} == {neon_num}: Neon speak: "You guessed it!" Exit if {user_guess} > {neon_num}: Neon speak: "Lower" LOOP guess END if {user_guess} < {neon_num}: Neon speak: "Higher" LOOP guess END else if {user_guess} != "exit": Neon speak: "That's not a valid guess, try again." LOOP guess END Exit

Demo Profile Reconveyance

Script: Demo Profile Reconveyance Variable: body = "Test email body\nnewline" Variable: emailAddr = profile(user.email) Variable: spoken if {emailAddr}: Neon speak: "your email address is {emailAddr}" else: Neon speak: I don't know what your email address is Neon speak: Say something and I'll say it back to you voice_input(spoken) Neon Speak: You said: Reconvey: spoken Exit

Demo Weather Loop

Script: "Demo Weather Loop" Variable: location Variable: forecast LOOP WW Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" "Say exit to exit" voice_input(location) Case {location}: "A or Athens" Execute: "What is the weather in Athens" Neon speak: "about to repeat A" "B or Bombay" Execute: "What is the weather in Bombay" Neon speak: "say 10 day or 5 day forecast" voice_input(forecast) Case {forecast}: "10 day or 10" Execute: "What is the 10 day forecast for Bombay" "5 day or 5" Execute: "What is the 5 day forecast for Bombay" Neon speak: "about to repeat B" "S or Seattle" Execute: "What is the weather in Seattle" Neon speak: "about to repeat S" Neon speak: "End of loop WW." LOOP WW END Neon speak: "I'm done now." Exit

Eddie

Script: "Eddie" Variable: name Variable: more Language: en-gb, male Name Speak: Eddie, "Welcome to the Neongecko Intro, My name is Eddie." Name Speak: Eddie, "What is your name?" voice_input(name) Name Speak: Eddie, "hi {name}" Name Speak: Eddie, " I am good at searching for your favorite music and videos" Name Speak: Eddie, "You can ask me to play songs, albums, artists, shows, movies, and more." Name Speak: Eddie, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits." EXIT

Eliza 1965

Script: Eliza 1965 Language: "en-GB female" Variable: input = "" Variable: split_input Synonym: Run Eliza Synonym: Talk to Eliza Synonym: Let's talk Synonym: I'm feeling lonely Synonym: I'd like to talk with Synonym: Talk to Neon AI # Static Strings Variable: initial = It's nice to meet you. How are you today? Variable: final = Goodbye. Thank you for talking to me. Variable: quit = bye, goodbye, quit # Substitutions Variable: input_sub = dont don't, cant can't, wont won't, recollect remember, dreamt dreamed, dreams dream, maybe perhaps, when what, certainly yes, machine computer, computers computer, were was, "you're" "you are", "i'm" "i am", same alike # Synonyms Variable: belief = belief, feel, think, believe, wish Variable: family = family, mother, mom, father, dad, sister, brother, wife, children, child Variable: desire = desire, want, need, wish Variable: sad = sad, unhappy, depressed, sick Variable: happy = happy, elated, glad, better Variable: cannot = cannot, can't Variable: everyone = everyone, everybody, nobody, noone Variable: people = people, they, others, adults, children, teenagers Variable: be = be, am, is, are, was Variable: sorry = sorry, i apologize Variable: language = deutsch, francais, italiano, espanol # Input to response matching Variable: key_sub = "* [sorry] for {sorry_1}" "Please don't apologize about {sorry_1}" "No need to apologize about {sorry_1[*]}" "I've told you that apologies are not required.", "i remember {2}" "Do you often think of {2}?" "Does thinking of {2} bring anything else to mind?" "What else do you recollect?" "Why do you recollect {2} just now?" "What in the present situation reminds you of {2}?", "do you remember {2}" "Did you think I would forget {2}?" "Why do you think I should recall {2} now?" "What about {2}? "You mentioned {2}?", "if *" "Do you think its likely that *?" "Do you wish that *?" "What do you know about *?" "Really, if *?", "* dreamed {1}" "Really, {1}?" "Have you ever fantasized {1} while you were awake?" "Have you ever dreamed {1} before?", "dream" "What does that dream suggest to you?" "Do you dream often?" "What persons appear in your dreams? "Do you believe that dreams have something to do with your problems?", "perhaps" "You don't seem quite certain." "Why the uncertain tone?" "Can't you be more positive?" "You aren't sure?" "Don't you know?", "name" "I am not interested in names." "I've told you before, I don't care about names -- please continue.", "*[language]*" "I speak only English" "I do not speak {[language]}", "hello" "How do you do. Please state your problem." "Hi. What seems to be your problem?", "how are you" "We were discussing you -- not me.", "are you *" "Why are you interested in whether I am * or not?" "Would you prefer if I weren't *?" "Perhaps I am * in your fantasies." "Do you sometimes think I am *?", "computer" "Do computers worry you?" "Why do you mention computers?" "What do you think machines have to do with your problem?" "Don't you think computers can help people?" "What about machines worries you?" "What do you think about machines?", "am i *" "Do you believe you are *?" "Would you want to be *?" "Do you wish I would tell you you are *?" "What would it mean if you were *?", "[people] are *" "Did you think they might not be *?" "Would you like it if they were not *?" "What if they were not *?" "Possibly they are *.", "was i *" "What if you were *?" "Do you think you were *?" "Were you *?" "What would it mean if you were *?" "What does * suggest to you ?", "i was *" "Were you really?" "Why do you tell me you were * now?" "Perhaps I already know you were *.", "was you *" "Would you like to believe I was *?" "What suggests that I was *?" "What do you think?" "Perhaps I was *." "What if I had been *?", "i am * [sad]" "I am sorry to hear that you are {[sad]}." "Do you think that coming here will help you not to be {[sad]}?" "I'm sure it's not pleasant to be {[sad]}." "Can you explain what made you {[sad]}?", "i am * [happy]" "How have I helped you to be {[happy]}?" "Has your treatment made you {[happy]}?" "What makes you {[happy]} just now?" "Can you explain why you are suddenly {[happy]}?", "i [belief] {1} i {2}" "Do you really think so?" "But you are not sure you {2}." "Do you really doubt you {2}?", "i am *" "Is it because you are * that you came to me?" "How long have you been *?" "Do you believe it is normal to be *?" "Do you enjoy being *?", "i [cannot] *" "Why do you think that you can't *?" "Have you tried?" "Perhaps you could * now." "Do you really want to be able to *?", "i don't *" "Don't you really *?" "Why don't you *?" "Do you wish to be able to *?" "Does that trouble you?", "do i feel *" "Tell me more about such feelings." "Do you often feel *?" "Do you enjoy feeling *?" "Of what does feeling * remind you?", "i * you" "Perhaps in your fantasies we * each other." "Do you wish to * me?" "You seem to need to * me." "Do you * anyone else?", "you are *" "What makes you think I am *?" "Does it please you to believe I am *?" "Do you sometimes wish you were *?" "Perhaps you would like to be *.", "you * me" "Why do you think I * you?" "You like to think I * you, don't you ?" "What makes you think I * you?" "Really, I * you?" "Do you wish to believe I * you?" "Suppose I did * you -- what would that mean?" "Does someone else believe I * you?", "yes" "You seem to be quite positive." "You are sure." "I see." "I understand.", "no" "Are you saying no just to be negative?" "You are being a bit negative." "Why not?" "Why 'no'?", "my {1} [family] {2}" "Tell me more about your {[family]}." "Who else in your family {2}?" "Your {[family]}?" "What else comes to mind when you think of your {[family]}?", "i [desire] *" "What would it mean to you if you got *?" "Why do you want *?" "Suppose you got * soon?" "What if you never got *?" "What would getting * mean to you?" "What does wanting * have to do with this discussion?", "what" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "because" "Is that the real reason?" "Don't any other reasons come to mind?" "Does that reason seem to explain anything else?" "What other reasons might there be?", "why don't you *" "Do you believe I don't *?" "Perhaps I will * in good time." "Should you * yourself?" "You want me to *?", "why can't i *" "Do you think you should be able to *?" "Do you want to be able to *?" "Do you believe this will help you to *?" "Have you any idea why you can't *?", "why" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "[everyone] {1}" "Really, {[everyone]}?" "Surely not {[everyone]} {1}." "Can you think of anyone in particular ?" "Who, for example?" "Are you thinking of a very special person?" "Who, may I ask?" "Someone special perhaps?" "You have a particular person in mind, don't you?" "Who do you think you're talking about?", "always" "Can you think of a specific example?" "When?" "What incident are you thinking of?" "Really, always?", "alike" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "[be] like" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "can you *" "You believe I can * don't you?" "You want me to be able to *." "Perhaps you would like to be able to * yourself.", "can i *" "Whether or not you can * depends on you more than me." "Do you want to be able to *?" "Perhaps you don't want to *.", "your *" "Why are you concerned over my *?" "What about your own *?" "Are you worried about someone else's *?" "Really, my *?", "my *" "Your *?" "Why do you say your *?" "Does that suggest anything else which belongs to you?" "Is it important that your *?", "you *" "We are discussing you -- not me." "Oh. I *?" "You're not really talking about me -- are you?" "What are your feelings now?", "i *" "You say *?" "Can you elaborate on that?" "Do you say * for some special reason?" "That's quite interesting.", "thank you" "you are welcome" "don't mention it" "no problem", "[quit]" "{final}", "*" "I'm not sure I understand you fully." "Please go on." " What do you mean by *?" "Do you feel strongly about discussing such things?" Name speak: Eliza: {initial} LOOP pre voice_input {input} Set: user_speech = {input} sub_values{input, input_sub} sub_key{input, key_sub} Name speak: Eliza: {input} if {user_speech} in {quit}: Exit LOOP pre END Neon speak: {final} Exit

Good Morning

Script: "Good Morning" Neon speak: "Good Morning" "The time is" Execute: "What time is it" Neon speak: "The weather is" Execute: "what is the weather" Neon speak: "Thank you for starting me up. I look forward to talking with you" Exit

Grocery Greeter

Script: "Grocery Greeter" Variable: init Variable: name Variable: more # Variable: {}: "" Neon Speak: "Starting the Grocery Greeter. Waiting for activation" voice_input(init) Neon Speak: "Welcome to the Neon Gecko Grocery Store." # Neon Speak: "Welcome to the Neon Gecko Grocery Store Greeter. My name is Neon." # Neon Speak: "What is your name?" # voice_input{name} # Neon Speak: "hi {name}" Neon Speak: "What can I help you find?" LOOP Q1 Neon Speak: "For example say produce for fresh vegetables, nuts, and fruit, or more for more options" voice_input(more) Neon Speak: {more} IF "more" IN {more}: Neon Speak: "more IN {more}" Goto: say_options IF "done" == {more}: Neon Speak: "done == {more}" Goto: say_goodbye IF "more" == {more}: Neon Speak: "more == {more}" Goto: say_options IF "Meat" IN {more}: Neon Speak: "Meat can be found in Aisle 7, towards the back of the store" IF "Dairy" IN {more}: Neon Speak: "Dairy can be found in Aisle 1, towards the front of the store" IF "Produce" IN {more}: Neon Speak: "Produce can be found in Aisle 3, near the bakery" IF "Frozen" IN {more}: Neon Speak: "Frozen Foods can be found in Aisle 5, in the middle of the store" IF "Bakery" IN {more}: Neon Speak: "The bakery can be found in Aisle 2, towards the front of the store" IF "Deli" IN {more}: Neon Speak: "Deli items can be found in Aisle 8, towards the back of the store, near the Meat Department" IF "Medicine" IN {more}: Neon Speak: "Medicine can be found in Aisle 4, towards the middle of the store" @say_options Neon Speak: "Still need assistance? Say meat, or dairy, or cleaning" # Neon Speak: "You can also say specific items, like apples, or steak" # Neon Speak: "You can say produce, frozen, bakery, deli, or more" # Neon Speak: "Say done to exit at any time" LOOP Q1 END @say_goodbye Neon Speak: "Goodbye" Exit

Guess My Word

Script: "Guess My Word" Language: en-us, female # Demonstration word game player from Neon AI # "Hi {userName}. Let's play the game guess my 7 word popular phrase. It very simple. I will choose a 7 word phrase and tell you one word. Then you guess a word, and if it is in the seven work phrase I will tell you its position or to guess again. Anytime you want you can guess the phrase, just say I guess and I will tell you if you're right. If you want me to tell you what you've already guessed, just say recap or history. Say hint and I will tell you another word." # Later n word phrases; n letter words; subject specific popular phrase input from Wolfram, google; foreign language # Set up wait time for participant responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT @AnnounceVersion Name Speak: Gamon,"Neon Word Game Demonstration Version 2020 08 06 22:30 Testing" # Announce version ("Testing" is displayed as text and is not spoken) Variable: sevenWordPhraseArray = "A DATE THAT WILL LIVE IN INFAMY", "A DAY THAT WILL LIVE IN INFAMY", "A WORD TO THE WISE IS ENOUGH", "A WORD TO THE WISE IS SUFFICIENT", "AND A MERRY OLD SOUL WAS HE", "CAN'T SEE THE FOREST FOR THE TREES", "CHILL OUT AND PLAY SOME VIDEO GAMES", "COME OUT COME OUT WHEREVER YOU ARE", "I SMELL THE BLOOD OF AN ENGLISHMAN", "I'M LATE FOR A VERY IMPORTANT DATE", "IF IT AIN'T BROKE DON'T FIX IT", "IF YOU BUILD IT HE WILL COME", "IF YOU BUILD IT THEY WILL COME", "IT WAS A DARK AND STORMY NIGHT", "IT'S ALL HUMBUG I TELL YOU HUMBUG", "JACK AND JILL WENT UP THE HILL", "JACK FELL DOWN AND BROKE HIS CROWN", "LAUGH AND THE WORLD LAUGHS WITH YOU", "LEAP TALL BUILDINGS IN A SINGLE BOUND", "LIFE LIBERTY AND THE PURSUIT OF HAPPINESS", "LIONS AND TIGERS AND BEARS OH MY", "LITTLE BO PEEP HAS LOST HER SHEEP", "LITTLE PIGS LITTLE PIGS LET ME IN", "LIVE FROM NEW YORK IT'S SATURDAY NIGHT", "NEITHER A BORROWER NOR A LENDER BE", "NOT BY THE HAIR ON MY CHINNY-CHIN-CHIN", "NOT BY THE HAIR OF MY CHINNY-CHIN-CHIN", "NOW I LAY ME DOWN TO SLEEP", "OH WHAT A TANGLED WEB WE WEAVE", "ONE THING I CAN SAY FOR SURE", "OLD MOTHER HUBBARD WENT TO THE CUPBOARD", "OVER THE RIVER AND THROUGH THE WOODS", "THE BEST-LAID SCHEMES OF MICE AND MEN", "THE BEST-LAID PLANS OF MICE AND MEN", "DISCRETION IS THE BETTER PART OF VALOR", "THE BETTER PART OF VALOR IS DISCRETION", "THE FACE THAT LAUNCHED A THOUSAND SHIPS", "THE HABITS OF HIGHLY EFFECTIVE PEOPLE", "THE STUFF THAT DREAMS ARE MADE FROM", "THE STUFF THAT DREAMS ARE MADE OF", "THE STUFF OF WHICH DREAMS ARE MADE", "THE STUFF FROM WHICH DREAMS ARE MADE", "THINGS THAT GO BUMP IN THE NIGHT", "THIS IS THE SONG THAT NEVER ENDS "TO ERR IS HUMAN TO FORGIVE DIVINE", "TO FETCH HER POOR DOG A BONE", "WE HOLD THESE TRUTHS TO BE SELF-EVIDENT", "WE THE PEOPLE OF THE UNITED STATES", "WHEN IN THE COURSE OF HUMAN EVENTS" Variable: usedPhrases Variable: chosenPhrase Variable: hintCount Variable: sayNext Variable: foundWords Variable: chosenPhraseWords Variable: chosenPhraseWordsByLen Variable: iWord Variable: blankCount Variable: userInput Variable: userInputWords Variable: userInputWordsLen usedPhrases[*] = "" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "what time is it", "Remind me to", "Play", "Record this", "Send an email", "Send a text" heyList = "hey Gamon", "Gamon are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British", "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Gamon,"Hi, I'm Gamon. I'm a demonstration word game player from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." GOTO : ASK @InstallAssistant userName = {askReturnValue} Name Speak: Gamon,"Hi {userName}. I am glad you chose to play word games with me." ## Offer additional information @ReAskMoreInfo Name Speak: Gamon,"Before starting the Neon Word Game, would you like more information on the Neon conversational AI?" timeoutReturnLabel = ReAskMoreInfo voice_input(moreAppInfo) if {moreAppInfo} IN {noList[*]}: GOTO : PromptCustomize Name Speak: Gamon,"Hi {userName}. I'm Gamon the word games playing assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) customLanguage = "" enableNeonApps = {True} Name Speak: Gamon,"Would you like to customize the Neon Word Game settings to change my voice?" # Later: Provide example of new Language/Prosody and offer reset timeoutReturnLabel = PromptCustomize voice_input(customizeSettings) if {customizeSettings} !IN {yesList[*]}: GOTO : BeginAssistant Name Speak: Gamon,"Hi {userName}. You can customize my voice for the Neon demonstration conversational game player. You can say female, male, normal, fast, slow, American, British or Australian, or say no change. " @ReAskCustomize # Name Speak: Gamon,"Would you like to change the voice of the Neon conversational Word Game Assistant?" timeoutReturnLabel = ReAskCustomize voice_input(customizeSettings) if {customizeSettings} == "": GOTO : PromptCustomize if {customizeSettings} CONTAINS "no change": GOTO : BeginAssistant if {customizeSettings} IN {noList[*]}: GOTO : BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" @ReAskApps Name Speak: Gamon,"Would you like to enable more Neon applications including playing music, playing other games, taking notes, setting reminders, making calculation, requesting general information or changing my voice?" timeoutReturnLabel = ReAskApps voice_input(customizeSettings) if {customizeSettings} == "": GOTO : ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} GOTO : BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Gamon," Your demonstration word game assistant has signed in. If you want to know if I am listening, you can say, hey Gamon , or, Gamon are you there. " Name Speak: Gamon,"Hi {userName}. Let's play the game guess my 7 word popular phrase. It very simple. I will choose a 7 word phrase and tell you one word. Then you guess a word, and if it is in the seven work phrase I will tell you its position or to guess again. Anytime you want you can guess the phrase, just say I guess and I will tell you if you're right. If you want me to tell you what you've already guessed, just say recap or history. Say hint and I will tell you another word." ### SET UP GAME # Choose New Phrase @ChooseNewPhrase chosenPhrase = random(sevenWordPhraseArray) # Check if used before if usedPhrases CONTAINS chosenPhrase GOTO : ChooseNewPhrase # Add New Phrase to list of phrased used usedPhrases = chosenPhrase hintCount = 0 sayNext = "" foundWords[*] = "" # Build word row for the sevenWordPhrase Python: chosenPhraseWords = chosenPhrase.split() # Build word row by word length [0]..[6] Python: chosenPhraseWordsByLen = chosenPhraseWords.sort(key=len) @NextHint # Give first or next hint if foundWords CONTAINS chosenPhraseWordsByLen[hintCount] : Python: hintCount++ GOTO : NextHint Name Speak: Gamon,"Hint {hintCount}, the {sayNext} longest word is" {chosenPhraseWordsByLen[hintCount]} foundWords = {chosenPhraseWordsByLen[hintCount]} Python: hintCount++ sayNext = "next" @GuessNextWord Name Speak: Gamon,"Here's where we're at" iWord = 0 blankCount = 0 LOOP SayFoundWords if chosenPhraseWord[iWord] in foundWords : Name Speak: Gamon,chosenPraseWord[i] else Name Speak: Gamon,"blank" Python: blankCount++ Python: iWord++ LOOP SayFoundWords UNTIL iWord >= 7 if blankCount == 0 Name Speak: Gamon,"Game Over! Thank you {userName} for playing with me" Name Speak: Gamon,"Let's play again" GOTO : ChooseNewPhrase ### Wait for Gamon/Emergency/Neon activiation alert phrase @WaitForAlertPhrase askPrompt = "Say I guess followed by a word, or I guess followed a phrase, or hint or recap or guessed words or exit" timeoutReturnLabel = WaitForAlertPhrase returnLabel = GotUserPhrase Goto : ASK @GotUserPhrase userInput = askReturnValue if {userInput} == "" : GOTO : ReAskGuess if {userInput} STARTSWITH "hint" : GOTO : NextHint if {userInput} IN "guessed words", "recap", "history" : Name Speak: Gamon, "Here are your mis guessed words: {guessedWords}" GOTO : GuessNextWord if {userInput} STARTSWITH "I guess" : Python: userInputWords = userInput.split() Python: userInputWordsLen = len(userInputWords) Python: userInputWords = userInput.split() if userInputWordsLen == 3 : guessedWord = userInputWords[2] if chosenPhraseWords[*] CONTAINS guessedWord : if guessedWord !IN foundWords[*] : foundWords = guessedWord else if guessedWord !IN misGuessedWords[*] : misGuessedWords = guessedWord GOTO : GuessNextWord if userInputWordsLen != 9 : # wrong number of words Name Speak: Gamon,"I'm sorry {userName} I heard the wrong number of words." Name Speak: Gamon,"I heard {userInputWords}" Name Speak: Gamon,"Please try again." GOTO : GuessNextWord if userInputWords[2:] != chosenPhrase Name Speak: Gamon,"I heard {userInputWords}" Name Speak: Gamon,"I'm sorry {userName} that's not the popular phrase I'm thinking of." Name Speak: Gamon,"Please try again." GOTO : GuessNextWord Name Speak: Gamon, "Yay {userName} userInputWords[2:] is correct." Name Speak: Gamon,"Game Over! Thank you {userName} for playing with me" Name Speak: Gamon,"Let's play again" GOTO : ChooseNewPhrase ### SYSTEM ALERT PHRASES ## Did user ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: if {askReturnValue} STARTSWITH {inProgressList[*]}: Case: # inProgressList = "what time is it", "Remind me to", "Play", "Record this", "Send an email", "Send a text" Name Speak: Gamon,"I'm sorry {userName} that is under construction." ## Not a Gamon/Alert/Neon activation phrase, listen again GOTO : WaitForAlertPhrase # Possible EMERGENCY Name Speak: Gamon,"The Emergency Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak: Gamon,"PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp GOTO : ASK @ConfirmHelp ## Did user REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Gamon,"The Emergency Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak: Gamon,"PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : GOTO : Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak: Gamon,"{userName}! I need to hear from you! Is this an emergency?" GOTO : PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind", "not an emergency": Name Speak: Gamon,"The Emergency Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak: Gamon,"Did reconvey of jk" ## User said jk so restart listening Name Speak: Gamon,"Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 GOTO : WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Gamon,"{userName}! Needs! Help! This is an EMERGENCY" Name Speak: Gamon,"The Emergency Assistant would now send an emergency alert, sound an alarm, keep engaged with the user, and send updated alerts to the caregiver." Name Speak: Gamon,"Gamon test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak: Gamon," Gamon is restarting. Thanks again." GOTO : StartUp Name Speak: Gamon,"Gamon exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Gamon to perform an action, then the request is effected and Gamon continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Gamon,"Ask 1 Starting" if {askPrompt}: Name Speak: Gamon," {askPrompt} " ### Name Speak: Gamon,"Ask 2 Starting ask subroutine" voice_input(askReturnValue) ### Name Speak: Gamon,"Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Gamon,"Say yes to confirm exiting Gamon, the Neon Word Game Assistant" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Gamon,"Gamon , the Neon Word Game Assistant, signing off" exit else GOTO : ASK ### Name Speak: Gamon,"Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyList[*]}: Name Speak: Gamon," {userName}, Gamon the Word Game Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or if you say emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Gamon,"The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Gamon,"The false alarm count is {falseAlarmCount}!" GOTO : ASK ### Name Speak: Gamon,"Ask 5 About to return to {returnLabel}" GOTO: {returnLabel} @TIMEOUT GOTO: {timeoutReturnLabel}

Hello World Input

Script: "Hello World Input" Variable: input Neon speak: "Hello World. Say anything or exit" voice_input(input) Neon speak: "you said {input}" Exit

Jody

Script: "Jody" Language: en-au, female Variable: name Variable: more Name Speak: Jody, "Welcome to the Neongecko Intro, My name is Jody." Name Speak: Jody, "What is your name?" voice_input(name) Name Speak: Jody, "hi {name}" Name Speak: Jody, " I am knowledgeable about the weather. You can ask me questions like what is the weather in Seattle - or any world location" Name Speak: Jody, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers, otherwise you can type your questions in the box, after this start up exits." Exit

Language Test

Script: Language test Language: en-us, male Neon speak: "I am an American Male" Language: female, en-au Neon speak: "Now I am Australian Female" Language: en-gb Neon speak: Now I am British in your preferred gender Exit

Manuel

Script: "Manuel" Language: es-MX, male Variable: name Variable: more Name Speak: Manuel, "Welcome to the Neongecko Intro, My name is Manuel." Name Speak: Manuel, "What is your name?" voice_input(name) Name Speak: Manuel, "hi {name}" Name Speak: Manuel, " I am good at Spanish. You can say things like translate strawberry to Spanish, or speak to me in Spanish" Name Speak: Manuel, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits." EXIT

Mycroft Navigator

Script: "Mycroft Navigator" # Language: en-us, female Variable: options = table_scrape(https://mycroft.ai) Variable: chosen Variable: termination_bool = done Neon speak: "Please tell me what Mycroft web page you'd like to see. You can say things like {random(options)}" LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "What Mycroft web page would you like to see next?" LOOP WN END Exit

Neon Ai Android Startup

Script: "Neon AI Android Startup" Language: en-us, female Variable: startup_skill Neon speak: "Welcome to Neon AI Scripts. Please choose a script to run when you open the app." Execute: "tell me my scripts" Neon speak: "Which one would you like?" voice_input(startup_skill) Execute: "set my startup script to {startup_skill}" Exit

Neon Ai Navigator

Script: "Neon AI Navigator" Variable: options = table_scrape(https://neon.ai) Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like {random(options)} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Neon Speak "Hello

Script: "xyz" Neon speak "Hello" Neon speak: "Thank you for running the xyz script. Would you like to hear a joke" Execute: "tell me a joke" Neon speak: "Here is the current time" Execute: "what is the time" Exit

Neongecko Intro

Script: "Neongecko Intro" Variable: name Variable: more Neon Speak: "Welcome to the Neongecko Intro, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "hi {name}" Neon Speak: "Welcome to Neongecko.com." Neon Speak: "Exiting the Neon Welcome Script. If your microphone and speakers are enabled you can ask me for time, weather, play music, show videos, caffeine contents, etcetera" EXIT

Neongecko Website Demo

Script: Neongecko Website Demo Variable: name Variable: more Neon Speak: "Welcome to the Neongecko Intro, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "hi {name}" Neon Speak: "Welcome to Neon gecko.com. My name is Neon, I would love to show you more about our company and our products." LOOP Q1 Neon Speak: "I'll take you to the right webpage. What interests you?" Neon Speak: "For example say Android for the new Neon AI Android Communicator webpage, or more for more options" voice_input(more) Neon Speak: {more} IF "more" IN {more}: Neon Speak: "more IN {more}" Goto: say_options IF "done" == {more}: Neon Speak: "done == {more}" Goto: say_goodbye IF "more" == {more}: Neon Speak: "more == {more}" Goto: say_options IF "Android" IN {more}: Neon Speak: "Android in more" Execute: "browse to https://neongecko.com/NeonAIforAndroidPhones" IF "Nano" IN {more}: Execute: "browse to https://neongecko.com/NeonNanoforWebsiteDesigners" IF "home" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforHome" IF "Education" IN {more}: Execute: "browse to "https://neongecko.com/NeonAIforEducation" IF "Work" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforCorporations" IF "Chat" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforAdvancedSocialMedia" IF "Developers" IN {more}: Execute: "browse to https://neongecko.com/NeonSDKDevelopers" @say_options Neon Speak: "Say Nano or Education or Work or Chat or Developers" # Neon Speak: "Nano for Neon AI Nano or AI Home for Neon AI Pcs designed for Home and Hobbyists, or more" # Neon Speak: "AI Education for information regarding Neon AI and our commitment to Education, or more" # Neon Speak: "AI Work for Neon AI Business and Corporate offerings, or more" # Neon Speak: "AI Chat for Advanced Social Media, our Neon AI enhanced chat, or more" # Neon Speak: "Developers for Neon AI Programmers, join our developer community and help create the future, or more" LOOP Q1 END @say_goodbye Neon Speak: "Goodbye" Exit

Pat Test Andrii

Script: "Pat Test Andrii" Language: "en-us male" # Help I can't get up .. # Next: Execute - Remind me to take my medicine, Log patient stats and symptoms, Play Chopin, Play game, .. # Secondary non-emergency options .. "I need a nurse" .. "I'm hungry" .. "I'm hungary" # Next: Option to exit and test the Covid-19 screening script # Email the patient assistant information and/or Pat script ## Play back to the patient what they said ("You said .." is that correct?) ## Send alert #1-PatientAssistanceRequest to nursing/caregiving administration with stt, recording and photo ## Tell patient their caregiver has been alerted, provide cancel option ## LATER: Enable interactive administrator to respond with automated and/or custom reply, with stt .. and deactivate # Ask for details ## Do you have a life threatening emergency? ## If yes then sound alarm and send alert #2-Emergency ## Do you have bleeding .. problems breathing .. weakness .. fever .. coughing .. pulse slow or racing .. ## Send alert #3 # Later: sub-script execution and return (signal?) ## LATER: Keep talking, recoding, sending alerts ## I hope you can talk to me. What's your name? Tell me a few word about your situation ## LATER: Enable administrator to take snapshots, turn on audio, video, ## LATER: Light up Patient Assistant Device, and turn on patient room door sign ### Later: Add flexible calls for help .. eg. contains emergency or help twice, I feel xyz, I'm going to xyz # Later: # Check if camera available and take a photo if available # Execute: Neon take a photo # Later: # photoTime = CURRENT_TIME() # email alert with photo to care administrator # Later: # Begin recording audio in an emergency # Sending alerts with recordings to caregiver administrator on a schedule (eg every 2 minutes) ## SOON .. (Next - Make Timeout wait time and time out label optional parameters for the user_input function) # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak: Pat, "Neon Patient Assistant Application Demonstration Version 2020 07 09 18:22 Testing" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue = "" Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps Variable: emailScriptList Variable: alarmScriptList Variable: conversationTranscript = "Our conversation went like this \n" Variable: userSymptoms Variable: gatherSymptomsList @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} emailScriptList = "send script", "email script", "send my the script", "email me the script" alarmScriptList = "alarm", "alarms", "remind", "reminder", "reminders", "timer", "timers", "time is left", "quiet", "go to sleep", "wake up", "snooze", "stop" gatherSymptomsList = "headache", "pain", "feel bad", "not feel good", "don't feel good", "I think I got" # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Pat, "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak: Pat, "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak: Pat, "Before starting the Patient Assistant would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input{moreAppInfo} if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak: Pat, "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant. I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) customLanguage = "" enableNeonApps = {True} Name Speak: Pat, "Would you like to customize the Patient Assistant settings to disable non-emergency Neon AI patient applications, or to change my voice?" # Name Speak: Pat, "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input{customizeSettings} if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak: Pat, "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak: Pat, "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input{customizeSettings} if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @ReAskApps Name Speak: Pat, "Would you like to enable more Neon patient assistance applications including playing music, playing games, reminders for medicine, hydration, meals and sleep, requests to record symptoms or other stats, and to request general information or assistance with math?" timeoutReturnLabel = ReAskApps voice_input{customizeSettings} if {customizeSettings} == "": Goto: ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} Goto: BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Pat, " Your demonstration patient assistant has signed in. If you want to know if I am listening, you can say, hey Pat, or, Pat are you there. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak: Pat, "PA 1 pre ask" Goto : ASK @GotPatientPhrase # Saving conversation conversationTranscript = "{conversationTranscript}, Prompt {askPrompt} Reply {askReturnValue}\n" ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) #if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: #if {askReturnValue} STARTSWITH {inProgressList[*]}: #Case: #Name Speak: Pat, "I'm sorry {userName} that is under construction." # inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" if {askReturnValue} CONTAINS {gatherSymptomsList}: Name Speak: Pat, "Gathering Symptoms" returnLabel = AskingSymptoms askPrompt = "Please describe me your symptoms" Goto : ASK @AskingSymptoms userSymptoms = "{userSymptoms}, {askReturnValue}" Name Speak: Pat, "I heard you say {userSymptoms}" # Reconvey: {userSymptoms} Name Speak: Pat, "Thank you. I am sending these symptoms to your caregiver." conversationTranscript = "{conversationTranscript}, Prompt {askPrompt} Reply {askReturnValue}\n" returnLabel = GotPatientPhrase askPrompt = "" # Email: "{userName} has Symptoms", userSymptoms # testing how transcript works if {askReturnValue} == "transcript": Name Speak: Pat, "{conversationTranscript}" # Email the transcript of the conversation # TODO Think about how to limit the number of phrases sent if {askReturnValue} CONTAINS {emailScriptList[*]}: Name Speak: Pat, "About to send you the transcript of our conversation" Email: "Conversation Transcript", conversationTranscript # Set an alarm delegating execution to the alert.neon skill # TODO: Checkout the alerts __init__ for handle_snooze alerts error if {askReturnValue} CONTAINS {alarmScriptList}: Name Speak: Pat, "I heard you want to set up an alarm" Execute: {askReturnValue} ### Later: Add flexible calls for help .. eg. contains emergency or help twice, I feel xyz, I'm going to xyz ### Name Speak: Pat, "Not alert, listen again" Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak: Pat, "Pat the Patient Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp Goto : ASK @ConfirmHelp ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Pat, "Pat the Patient Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak: Pat, "PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : Goto: Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak: Pat, "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak: Pat, "Pat the Patient Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak: Pat, "Did reconvey of jk" ## Patient said jk so restart listening Name Speak: Pat, "Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Pat, "{userName}! Needs! Help! This is an EMERGENCY" Name Speak: Pat, "Pat the Patient Assistant would now send an emergency alert, sound an alarm, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak: Pat, "Pat test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak: Pat, "Pat is restarting. Thanks again." Goto: StartUp Name Speak: Pat, "Pat exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Pat, "Ask 1 Starting" if {askPrompt}: Name Speak: Pat, " {askPrompt} " ### Name Speak: Pat, "Ask 2 Starting ask subroutine" voice_input {askReturnValue} ### Name Speak: Pat, "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Pat, "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input{askReturnValue} if {askReturnValue} IN {yesList[*]}: Name Speak: Pat, "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak: Pat, "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak: Pat, " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Pat, "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Pat, "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak: Pat, "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

Patient Assistant

Script: "Patient Assistant" Language: en-us, male # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak: Pat, "Neon Patient Assistant Application Demonstration Version 2020 07 07 18:00 Testing" Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" #askPrompt #returnLabel #heardSilence falseAlarmCount = 0 #askReturnValue #userName #moreAppInfo #customizeSettings #customizeLanguage customProsody = "rate='medium'" #photoTime # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Pat, "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak : Pat, "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak: Pat, "Before starting the Patient Assistant, would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input(moreAppInfo) if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak: Pat, "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) Name Speak: Pat, "Would you like to customize the Patient Assistant settings for my voice?" # Name Speak: Pat, "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input(customizeSettings) if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak: Pat, "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak: Pat, "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input(customizeSettings) if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant customLanguage = "" # Variable: britWords = british, gb, uk #if {customizeSettings} CONTAINS "British": if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Pat, " Your demonstration patient assistant has signed in. You can say, hey Pat, or, Pat are you there, if you want to know if I am listening. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak: Pat, "PA 1 pre ask" Goto : ASK @GotPatientPhrase ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ### Name Speak: Pat, "PA 4 not an alert, listen again" Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak: Pat, "PA 5 got alert, about to reconvey {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp ### Name Speak: Pat, "PA 7 about to ask to cancel help request" Goto : ASK @ConfirmHelp ### Name Speak: Pat, "PA 8 check for jk" ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Pat, "Pat the Patient Assistant heard nothing." Name Speak: Pat, "PA 7 got alert, about to reconvey of heard nothing {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 8 did reconvey of nothing?" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == "TRUE": Goto: Emergency heardSilence = "TRUE" ## LATER: Increase volume, speak slower Name Speak: Pat, "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak: Pat, "Pat the Patient Assistant heard you say this is not an emergency." Reconvey : askReturnValue Name Speak: Pat, "Please say help again if this is an emergency." ### Name Speak: Pat, "PA 9 jk so restart listening" Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Pat, "This is an EMERGENCY" Name Speak: Pat, "Pat the Patient Assistant would now send an emergency alert, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak: Pat, "Pat test completed. Say start again to start again?" voice_input(askReturnValue) ### Name Speak: Pat, "PA 10 check for restart request" if {askReturnValue} == "start again": ### Name Speak: Pat, "PA 10 restarting" Goto: StartUp Name Speak: Pat, "Pat exiting" exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Pat, "Ask 1 Starting" if {askPrompt}: Name Speak: Pat, " {askPrompt} " ### Name Speak: Pat, "Ask 2 Starting ask subroutine" voice_input(askReturnValue) ### Name Speak: Pat, "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Pat, "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Pat, "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak: Pat, "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak: Pat, " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Pat, "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Pat, "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak: Pat, "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

Subroutine Test

# Subroutine Test Script: "Subroutine Test" Name Speak : Patty, "Version 20200624 18:33 Subroutine Test" ## Initialize Variable: exitList = "Patty exit", "Patty cancel", "never mind" Variable: noList = "no", "not now", "never mind", "nope", "n" Variable: yesList = "yes", "yup", "y" Variable: alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "I need a doctor", "I need a doctor", "I need a doctor", "I need a doctor", "I need a doctor", "I need a nurse", "I need aid", "I need a caregiver", "I need assistance", "I fell", "I can't get up" Variable: heyPattyList = "hey Patty", "Patty are you there" Variable: askPrompt Variable: returnLabel = InstallAssistant Variable: askInput = "Hi, I'm Patty. Say your name, or cancel." Goto : ASK @InstallAssistant userName = askInput Name Speak : Patty : "Hi {userName}. I am glad you chose to test subroutines." Name Speak : Patty : "Patty Exiting" exit ## @ASK if {askPrompt} != "" Name Speak : Patty, "{askPrompt}" voice_input {askInput} if {askInput} IN {exitList[*]}: Name Speak : Patty, "Say yes to confirm exiting Patty" voice_input(askInput) if {askInput} IN {yesList[*]}: Name Speak : Patty, "Patty, signing off" exit else goto : ASK if {askInput} IN {heyPattyList[*]}: Name Speak : Patty, "Patty, the Neon AI Patient Assistant, is listening" goto : ASK Name Speak : Patty, "About to return to {returnLabel}" Goto: {returnLabel}

Table Scrape Demo

Script: "Table Scrape Demo" # TODO: This function has changed Variable: options = table_scrape(https://www.neongecko.com/demos) Variable: chosen Neon speak: "Please tell me what kind of help video you would like to see. You can say things like random(options)" voice_input(chosen) Neon speak: "Okay" Execute: "av play closest(chosen,options)" Exit

Test Eliza

Script: Test Eliza Language: en-GB, female Variable: input Variable: split_input # Static Strings Variable: initial = It's nice to meet you. How are you today? Variable: final = Goodbye. Thank you for talking to me. Variable: quit = bye, goodbye, quit # Substitutions Variable: input_sub = dont don't, cant can't, wont won't, recollect remember, dreamt dreamed, dreams dream, maybe perhaps, when what, certainly yes, machine computer, computers computer, were was, "you're" "you are", "i'm" "i am", same alike # Synonyms Variable: belief = belief, feel, think, believe, wish Variable: family = family, mother, mom, father, dad, sister, brother, wife, children, child Variable: desire = desire, want, need, wish Variable: sad = sad, unhappy, depressed, sick Variable: happy = happy, elated, glad, better Variable: cannot = cannot, can't Variable: everyone = everyone, everybody, nobody, noone Variable: people = people, they, others, adults, children, teenagers Variable: be = be, am, is, are, was Variable: sorry = sorry, i apologize Variable: language = deutsch, francais, italiano, espanol # Input to response matching Variable: key_sub = "{sorry_0} [sorry] for {Vsorry}" "Please don't apologize about {Vsorry}" "No need to apologize about {Vsorry[*]}" "I've told you that apologies are not required." "Vsorry's are {Vsorry[*]}", "i remember {Viremember}" "Do you often think of {Viremember}?" "Does thinking of {Viremember} bring anything else to mind?" "What else do you recollect?" "Why do you recollect {Viremember} just now?" "What in the present situation reminds you of {Viremember}?" "Viremember's are {Viremember[*]}", "do you remember {Vyouremember}" "Did you think I would forget {Vyouremember}?" "Why do you think I should recall {Vyouremember} now?" "What about {Vyouremember}? "You mentioned {Vyouremember}?" "Vyouremember's are {Vyouremember[*]}", "if {Vif}" "Do you think its likely that {Vif}?" "Do you wish that {Vif}?" "What do you know about {Vif}?" "Really, if {Vif}?" "Vif's are {Vif[*]}", "{Vdreamed} dreamed {Vdreamed2}" "Really, {Vdreamed2}?" "Have you ever fantasized {Vdreamed2} while you were awake?" "Have you ever dreamed {Vdreamed2} before?" "Vdreamed2's are {Vdreamed2[*]}", "dream" "What does that dream suggest to you?" "Do you dream often?" "What persons appear in your dreams? "Do you believe that dreams have something to do with your problems?", "perhaps" "You don't seem quite certain." "Why the uncertain tone?" "Can't you be more positive?" "You aren't sure?" "Don't you know?", "name" "I am not interested in names." "I've told you before, I don't care about names -- please continue.", "{Vlanguage}[language]{Vlanguage2}" "I speak only English" "I do not speak {[language]}", "hello" "How do you do. Please state your problem." "Hi. What seems to be your problem?", "how are you" "We were discussing you -- not me.", "are you {Vareyou}" "Why are you interested in whether I am {Vareyou} or not?" "Would you prefer if I weren't {Vareyou}?" "Perhaps I am {Vareyou} in your fantasies." "Do you sometimes think I am {Vareyou}?" "Vareyou's are {Vareyou[*]}", "computer" "Do computers worry you?" "Why do you mention computers?" "What do you think machines have to do with your problem?" "Don't you think computers can help people?" "What about machines worries you?" "What do you think about machines?", "am i {Vami}" "Do you believe you are {Vami}?" "Would you want to be {Vami}?" "Do you wish I would tell you you are {Vami}?" "What would it mean if you were {Vami}?" "Vami's are {Vami[*]}", "[people] are {Vpeople}" "Did you think they might not be {Vpeople}?" "Would you like it if they were not {Vpeople}?" "What if they were not {Vpeople}?" "Possibly they are {Vpeople}." "Vpeople's are {Vpeople[*]}", "was i {Vwasi}" "What if you were {Vwasi}?" "Do you think you were {Vwasi}?" "Were you {Vwasi}?" "What would it mean if you were {Vwasi}?" "What does {Vwasi} suggest to you ?" "Vwasi's are {Vwasi[*]}", "i was {Viwas}" "Were you really?" "Why do you tell me you were {Viwas} now?" "Perhaps I already know you were {Viwas}." "Viwas's are {Viwas[*]}", "was you {Vwereyou}" "Would you like to believe I was {Vwereyou}?" "What suggests that I was {Vwereyou}?" "What do you think?" "Perhaps I was {Vwereyou}." "What if I had been {Vwereyou}?" "Vwereyou's are {Vwereyou[*]}", "i am {Vsad} [sad]" "I am sorry to hear that you are {[sad]}." "Do you think that coming here will help you not to be {[sad]}?" "I'm sure it's not pleasant to be {[sad]}." "Can you explain what made you {[sad]}?", "i am {Vhappy} [happy]" "How have I helped you to be {[happy]}?" "Has your treatment made you {[happy]}?" "What makes you {[happy]} just now?" "Can you explain why you are suddenly {[happy]}?", "i [belief] {Vbelief1} i {Vbelief2}" "Do you really think so?" "But you are not sure you {Vbelief2}." "Do you really doubt you {Vbelief2}?" "Vbelief2's are {Vbelief2[*]}", "i am {Viam}" "Is it because you are {Viam} that you came to me?" "How long have you been {Viam}?" "Do you believe it is normal to be {Viam}?" "Do you enjoy being {Viam}?" "Viam's are {Viam[*]}", "i [cannot] {Vicannot}" "Why do you think that you can't {Vicannot}?" "Have you tried?" "Perhaps you could {Vicannot} now." "Do you really want to be able to {Vicannot}?" "Vicannot's are {Vicannot[*]}", "i don't {Vidont}" "Don't you really {Vidont}?" "Why don't you {Vidont}?" "Do you wish to be able to {Vidont}?" "Does that trouble you?" "Vidont's are {Vidont[*]}", "do i feel {Vdoifeel}" "Tell me more about such feelings." "Do you often feel {Vdoifeel}?" "Do you enjoy feeling {Vdoifeel}?" "Of what does feeling {Vdoifeel} remind you?" "Vdoifeel's are {Vdoifeel[*]}", "i {Viyou} you" "Perhaps in your fantasies we {Viyou} each other." "Do you wish to {Viyou} me?" "You seem to need to {Viyou} me." "Do you {Viyou} anyone else?" "Viyou's are {Viyou[*]}", "you are {Vyouare}" "What makes you think I am {Vyouare}?" "Does it please you to believe I am {Vyouare}?" "Do you sometimes wish you were {Vyouare}?" "Perhaps you would like to be {Vyouare}." "Vyouare's are {Vyouare[*]}", "you {Vyoume} me" "Why do you think I {Vyoume} you?" "You like to think I {Vyoume} you, don't you ?" "What makes you think I {Vyoume} you?" "Really, I {Vyoume} you?" "Do you wish to believe I {Vyoume} you?" "Suppose I did {Vyoume} you -- what would that mean?" "Does someone else believe I {Vyoume} you?" "Vyoume's are {Vyoume[*]}", "yes" "You seem to be quite positive." "You are sure." "I see." "I understand.", "no" "Are you saying no just to be negative?" "You are being a bit negative." "Why not?" "Why 'no'?", "my {Vmyfamily1} [family] {Vmyfamily2}" "Tell me more about your {[family]}." "Who else in your family {Vmyfamily2}?" "Your {[family]}?" "What else comes to mind when you think of your {[family]}?" "Vmyfamily2's are {Vmyfamily2[*]}", "i [desire] {Vdesire}" "What would it mean to you if you got {Vdesire}?" "Why do you want {Vdesire}?" "Suppose you got {Vdesire} soon?" "What if you never got {Vdesire}?" "What would getting {Vdesire} mean to you?" "What does wanting {Vdesire} have to do with this discussion?" "Vdesire's are {Vdesire[*]}", "what" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "because" "Is that the real reason?" "Don't any other reasons come to mind?" "Does that reason seem to explain anything else?" "What other reasons might there be?", "why don't you {Vwhydontyou}" "Do you believe I don't {Vwhydontyou}?" "Perhaps I will {Vwhydontyou} in good time." "Should you {Vwhydontyou} yourself?" "You want me to {Vwhydontyou}?" "Vwhydontyou's are {Vwhydontyou[*]}", "why can't i {Vwhycanti}" "Do you think you should be able to {Vwhycanti}?" "Do you want to be able to {Vwhycanti}?" "Do you believe this will help you to {Vwhycanti}?" "Have you any idea why you can't {Vwhycanti}?" "Vwhycanti's are {Vwhycanti[*]}", "why" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "[everyone] {Veveryone}" "Really, {[everyone]}?" "Surely not {[everyone]} {Veveryone}." "Can you think of anyone in particular ?" "Who, for example?" "Are you thinking of a very special person?" "Who, may I ask?" "Someone special perhaps?" "You have a particular person in mind, don't you?" "Who do you think you're talking about?" "Veveryone's are {Veveryone[*]}", "always" "Can you think of a specific example?" "When?" "What incident are you thinking of?" "Really, always?", "alike" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "[be] like" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "can you {Vcanyou}" "You believe I can {Vcanyou} don't you?" "You want me to be able to {Vcanyou}." "Perhaps you would like to be able to {Vcanyou} yourself." "Vcanyou's are {Vcanyou[*]}", "can i {Vcani}" "Whether or not you can {Vcani} depends on you more than me." "Do you want to be able to {Vcani}?" "Perhaps you don't want to {Vcani}." "Vcani's are {Vcani[*]}", "your {Vyour}" "Why are you concerned over my {Vyour}?" "What about your own {Vyour}?" "Are you worried about someone else's {Vyour}?" "Really, my {Vyour}?" "Vyour's are {Vyour[*]}", "my {Vmy}" "Your {Vmy}?" "Why do you say your {Vmy}?" "Does that suggest anything else which belongs to you?" "Is it important that your {Vmy}?" "Vmy's are {Vmy[*]}", "you {Vyou}" "We are discussing you -- not me." "Oh. I {Vyou}?" "You're not really talking about me -- are you?" "What are your feelings now?" "Vyou's are {Vyou[*]}", "i {Vi}" "You say {Vi}?" "Can you elaborate on that?" "Do you say {Vi} for some special reason?" "That's quite interesting." "Vi's are {Vi[*]}", "thank you" "you are welcome" "don't mention it" "no problem", "[quit]" "{final}", "{Vx}" "I'm not sure I understand you fully." "Please go on." " What do you mean by {Vx}?" "Do you feel strongly about discussing such things?" "Vx's are {Vx[*]}" Name speak: Eliza, {initial} LOOP pre voice_input(input) Set: user_speech = {input} sub_values(input, input_sub) sub_key(input, key_sub) Name speak: Eliza, {input} if {user_speech} in {quit}: Exit LOOP pre END Neon speak: {final} Exit

Test Email

Script: Test Email Variable: body = "Test email body\nnewline" Neon speak: "sending email" Email: "My Email Title", body Exit

Test Neon Demo

Script: "Test Neon Demo" Variable: test_set Neon speak: "Please select your test preference. You can choose from the following demos: 'personal' for profile setup" "'language' for translation," "'standard'," "'clapper or clap'," "'av or music'," "'picture or record'," "'caffeine'," "'email'," "'coupons'," "'summary'," "'clear'," "'alarm or timer'," "'wakewords or wake words'," "'dialog', or " "'control' group tests." voice_input(test_set) Case: {test_set} "personal" Execute: "neon my name is Joshua Test" "neon my name is John Jacob Jingleheimer Smith" "neon tell me my first name" "neon tell me my last name" "neon tell me my full name" "neon my email address is josh@neongecko.com" "language" Execute: "neon translate cherry to russian" "neon tell me my language setting" "neon speak to me in english" "neon speak to me in Russian and French" "neon speak to me in english" "standard" Execute: "neon say hello world" Execute: "what is the time" Execute: "what is today's date" Execute: "what time is it in paris" Execute: "what is the weather in seattle" Execute: "neon spell microphone" Execute: "what is 25 times 71" Execute: "what is the derivative of x squared" Execute: "what is the share price for ibm" Execute: "tell me a joke" Execute: "tell me about linux" Execute: "send me the source for that" Execute: "where are you" Execute: "who are you" Execute: "my location is Seattle, WA" Execute: "what is my ip address" "clapper or clap" Execute: "Set up clapper process" Execute: "Quit clapper process" Execute: "Deny clapper process by default" Execute: "Enable clapper process by default" "av or music" Execute: "neon av play Relaxing jazz radio" Execute: "neon av play Sleepy blues piano radio" Execute: "pause" Execute: "resume" Execute: "stop" Execute: "avplay american folk guitar radio" Execute: "increase volume" Execute: "decrease volume" Execute: "mute volume" Execute: "unmute volume" Execute: "what is the volume" Execute: "neon play the latest news" "picture or record" Execute: "take a picture" Execute: "show me my last picture" Execute: "take a 3-second video" Execute: "show me my last video" Execute: "neon record 3 seconds" Execute: "playback my last recording" "caffeine" Execute: "how much caffeine is in sprite" Execute: "how about j street coffee" Execute: "how much caffeine is in a cherry coke" "email" Execute: "email me my transcripts" "coupons" Execute: "neon update my brands" Execute: "i like google" Execute: "tell me coupons for microsoft" Execute: "i like neon" Execute: "tell me my likes" Execute: "i do not like alpha" Execute: "tell me my dislikes" Execute: "tell me my coupons" Execute: "email me my coupons" "summary" Execute: "neon talk to me in Russian" Execute: "what time is it in Moscow" Execute: "what is the weather in Moscow" Execute: "tell me about electricity" Execute: "what is 625 divided by 25" Execute: "tell me my likes" Execute: "how many inches are in a mile" Execute: "translate cherry to French" Execute: "how much caffeine is in pepsi" Execute: "talk to me in English" Execute: "change units/measuring system" "clear" Execute: "I want to clear my user brands" Execute: "I want to clear my user likes" Execute: "clear all of my user data" "alarm or timer" Execute: "neon set an alarm for 6:30 pm" Execute: "neon remind me to go home at 7 pm" Execute: "neon set a 2 minute timer" Execute: "neon how much time is left" Execute: "neon clear all reminders" Execute: "cancel all alarms" Execute: "cancel all timers" "wakewords or wake words" Execute: "require wakewords" Execute: "begin skipping wake words" Execute: "i am not alone" Execute: "neon i am alone" "dialog" Execute: "switch to primary dialogue mode" Execute: "how are you?" Execute: "switch to random dialogue mode" Execute: "how are you?" "control" Execute: "create a support ticket" Execute: "i want [you] to exit" Execute: " i want [you] to shutdown" Execute: "what is my current software version" Exit

Test Pat

Script: "Test Pat" Language: "en-us male" # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30 TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak : Pat : "Neon Patient Assistant Application Demonstration Version 2020 07 09 18:22 again Testing" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue = "" Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak : Pat : "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak : Pat : "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak : Pat : "Before starting the Patient Assistant, would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input{moreAppInfo} if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak : Pat : "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) customLanguage = "" enableNeonApps = {True} Name Speak : Pat : "Would you like to customize the Patient Assistant settings to disable non-emergency Neon AI patient applications, or to change my voice?" # Name Speak : Pat : "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input{customizeSettings} if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak : Pat : "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak : Pat : "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input{customizeSettings} if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @ReAskApps Name Speak : Pat : "Would you like to enable more Neon patient assistance applications including playing music, playing games, reminders for medicine, hydration, meals and sleep, requests to record symptoms or other stats, and to request general information or assistance with math?" timeoutReturnLabel = ReAskApps voice_input{customizeSettings} if {customizeSettings} == "": Goto: ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} Goto: BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak : Pat : " Your demonstration patient assistant has signed in. If you want to know if I am listening, you can say, hey Pat, or, Pat are you there. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak : Pat : "PA 1 pre ask" Goto : ASK @GotPatientPhrase ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: if {askReturnValue} STARTSWITH {inProgressList[*]}: Name Speak : Pat : "I'm sorry {userName} that is under construction." ## Not an alert, listen again Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak : Pat : "Pat the Patient Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak : Pat : "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp Goto : ASK @ConfirmHelp ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak : Pat : "Pat the Patient Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak : Pat : "PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : Goto: Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak : Pat : "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak : Pat : "Pat the Patient Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak : Pat : "Did reconvey of jk" ## Patient said jk so restart listening Name Speak : Pat : "Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak : Pat : "{userName}! Needs! Help! This is an EMERGENCY" Name Speak : Pat : "Pat the Patient Assistant would now send an emergency alert, sound an alarm, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak : Pat : "Pat test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak : Pat : "Pat is restarting. Thanks again." Goto: StartUp Name Speak : Pat : "Pat exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak : Pat : "Ask 1 Starting" if {askPrompt}: Name Speak : Pat : " {askPrompt} " ### Name Speak : Pat : "Ask 2 Starting ask subroutine" voice_input {askReturnValue} ### Name Speak : Pat : "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak : Pat : "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input{askReturnValue} if {askReturnValue} IN {yesList[*]}: Name Speak : Pat : "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak : Pat : "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak : Pat : " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak : Pat : "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak : Pat : "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak : Pat : "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

Test Ssml

Script: "Test SSML" Variable: input Neon Speak: "Hi. I can put a break in my speech, or I can emphasize a word." Neon Speak: I know that W3C is W3C Neon Speak: "I can be loud, or I can be quiet." Neon Speak: "I can talk very quickly, or a little faster, or talk slowly, or talk much slower" Neon Speak: "I can make my voice much higher, or just a little higher, or lower, "or much lower" Neon Speak: "I can speak 2/7 as 2/7, or 2/7" Neon Speak: "I can spell out words and a 3 digit number words and 321." Name Speak: Nobody, "Or I can speak as someone else." Name Speak: Fast Famale, "I can be loud, fast, and high" Name Speak: Slow Male, "I can be quiet, slow, and deep" Exit

Test Upload

Script: Test Upload Author: Daniel McKnight Description: This is only a test # Comment line # Above was a newline Exit

User Register Demo

Script: "User Register Demo" Variable: full_name Variable: first_name Variable: last_name Variable: selection Neon speak: "Hello human. My full name is Neon Gecko Inc. Please call me Neon. Lets get started." LOOP get_name Neon speak: "Please tell me your full name or say exit" voice_input(full_name) Execute: "neon my name is {full_name}" Neon speak: "Thank you." Python: time.sleep(5) Execute: "neon tell me my first name" Execute: "neon tell me my last name" LOOP change_name Neon speak: "Is that correct? Say yes, no, change first name, change last name or exit" voice_input(selection) Case: {selection} "yes" Neon speak: "Okay" Execute: "exit" "no" Neon speak: "Sorry. Please say name to try again" LOOP get_name END "change first name" Neon speak: "Tell me your first name or say exit" voice_input{first_name} Execute: "neon my first name is {first_name}" Execute: "neon tell me my first name" LOOP change_name END "change last name" Neon speak: "Tell me your last name or say exit" voice_input{last_name} Execute: "neon my last name is {last_name}" Execute: "neon tell me my last name" LOOP change_name END Exit

Variable Demo

Script: "Variable Demo" Language: en-au, female Variable: location Variable: info_type = time, weather, population Neon speak: "Say select_one(info_type) for world info" voice_input(info_type) Neon speak: "What location would you like?" voice_input(location) Execute: "What is the {info_type} in {location}" Exit

Weather Loop Demo

Script: "Demo Weather Loop" Variable: {location}: "" Variable: {forecast}: "" LOOP WW Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" "Say exit to exit" voice_input{location} Case {location}: "A or Athens" Execute: "What is the weather in Athens" Neon speak: "about to repeat A" "B or Bombay" Execute: "What is the weather in Bombay" Neon speak: "say 10 day or 5 day forecast" voice_input{forecast} Case {forecast}: "10 day or 10" Execute: "What is the 10 day forecast for Bombay" "5 day or 5" Execute: "What is the 5 day forecast for Bombay" Neon speak: "about to repeat B" "S or Seattle" Execute: "What is the weather in Seattle" Neon speak: "about to repeat S" Neon speak: "End of loop WW." LOOP WW END Neon speak: "I'm done now." Exit

Weather Time Population Goto

Script: "Weather Time Population Goto" Language: en-au, female Synonym: "Demo WTP Goto" Variable: response Neon speak: "Say 1 or World Times for world times" "Say 2 or World Weather for world weather" "Say 3 or World Populations for world populations" voice_input(response) Case {response}: "1 or World Times" Neon speak: "Say A or Athens for Athens's time" "Say B or Bombay for Bombay's time" "Say S or Seattle for Seattle's time" voice_input(response) Case {response}: "A or Athens" Execute: "What time is it in Athens" Goto: athens_weather "B or Bombay" Execute: "What time is it in Bombay" "S or Seattle" Execute: "What time is it in Seattle" "2 or World Weather" Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" voice_input(response) Case {response}: "A or Athens" @athens_weather Execute: "What is the weather in Athens" Goto: 50 "B or Bombay" Execute: "What is the weather in Bombay" "S or Seattle" Execute: "What is the weather in Seattle" "3 or World Populations" Neon speak: "Say A or Athens for Athens's population" "Say B or Bombay for Bombay's population" "Say S or Seattle for Seattle's population" voice_input(response) Case {response}: "A or Athens" Execute: "What is the population of Athens" "B or Bombay" Execute: "What is the population of Bombay" "S or Seattle" Execute: "What is the population of Seattle" Exit

Website Navigator

Script: "Website Navigator" # Synonym: "demo website navigator" # Synonym: "website navigator demo" # Language: "English American Female" Variable: options = table_scrape(https://neongecko.com) # Variable: {options}: demos: https://www.neongecko.com/demos , videos: https://www.neongecko.com/demos , nano: https://www.neongecko.com/NeonNanoforWebsiteDesigners , audible: https://www.neongecko.com/NeonAudibleAiTech , tools: https://www.neongecko.com/NeonTechnology , websites: https://www.neongecko.com/neonnano , phones: https://www.neongecko.com/NeonAndroid , devices: https://www.neongecko.com/NeonAIforHome Variable: chosen # Neon speak: "Options: {options}" Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like {random(options)} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to closest(chosen,options)" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Website Navigator Timeout

Script: "Website Navigator Timeout" Variable: options = table_scrape(https://neongecko.com) Variable: chosen Timeout: 10, instructions #Timeout: 10 7 @instructions Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like random{options} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Welcome

Script: "Welcome" Variable: name Variable: like Variable: location Variable: question Neon Speak: "Hello, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "Nice to meet you {name}" Neon Speak: "tell me a brand you like, for example, I like neon" voice_input(like) Execute: "tell me my coupons" Neon Speak: "Where are you" voice_input(location) Execute: "tell me the time in {location}" Execute: "tell me the weather in {location}" Neon Speak: "Please ask me a question or say exit" voice_input(question) if {question} == "exit" Exit Execute: "{question}" Exit

Welcome Loops Demo

Script: "Welcome Loops Demo" Variable: name Variable: like Variable: location Variable: question Neon Speak: "Hello, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "Nice to meet you {name}" Neon Speak: "tell me a brand you like, for example, I like neon" voice_input(like) Execute: "tell me my coupons" Neon Speak: "Where are you" voice_input(location) Execute: "tell me the time in {location}" Execute: "tell me the weather in {location}" LOOP Q1 Neon Speak: "Please ask me a question or say exit" if {question} == "exit" Exit voice_input(question) #Execute: "{question}" LOOP Q1 END Exit

Welcome Neon Demo

Script: "Welcome Neon Demo" #Language: "English British Male" Language: en-gb, male Variable: full_name Variable: first_name Variable: last_name Variable: response Neon speak: "Hello human. My full name is Neon Gecko Inc; call me Neon. Lets get started." Execute: "what time is it" Execute: "what is the weather" Neon speak: "Please say your first and last name or say exit, or you can type your response" voice_input(full_name) Execute: "my name is {full_name}" Neon speak: "Thank you." #Execute: "tell me my full name" if profile(user.first_name): Execute: "tell me my first name" if profile(user.last_name): Execute: "tell me my last name" Neon speak: "Is that correct? Say yes, change first name, change last name or exit" voice_input(response) Case: {response} "yes" Exit "change first name" Neon speak: "Tell me your first name or say exit" voice_input(first_name) Execute: "neon my first name is {first_name}" Execute: "neon tell me my first name" "change last name" Neon speak: "Tell me your last name or say exit" voice_input(last_name) Execute: "neon my last name is {last_name}" Execute: "neon tell me my last name" Exit

Wtp Demo

Script: "WTP Demo" Language: en-au, female Synonym: "Demo WTP" Synonym: "WTP Demo" Variable: response Neon speak: "Say 1 or World Times for world times" "Say 2 or World Weather for world weather" "Say 3 or World Populations for world populations" voice_input(response) Case {response}: "1 or World Times" Neon speak: "Say A or Athens for Athens's time" "Say B or Bombay for Bombay's time" "Say S or Seattle for Seattle's time" voice_input(response) Case {response}: "A or Athens" Execute: "What time is it in Athens" "B or Bombay" Execute: "What time is it in Bombay" "S or Seattle" Execute: "What time is it in Seattle" "2 or World Weather" Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" voice_input(response) Case {response}: "A or Athens" Execute: "What is the weather in Athens" "B or Bombay" Execute: "What is the weather in Bombay" "S or Seattle" Execute: "What is the weather in Seattle" "3 or World Populations" Neon speak: "Say A or Athens for Athens's population" "Say B or Bombay for Bombay's population" "Say S or Seattle for Seattle's population" voice_input(response) Case {response}: "A or Athens" Execute: "What is the population of Athens" "B or Bombay" Execute: "What is the population of Bombay" "S or Seattle" Execute: "What is the population of Seattle" Exit

Xyz

Script: "xyz" Neon speak: "Hello" Neon speak: "Thank you for running the xyz script. Would you like to hear a joke" Execute: "tell me a joke" Neon speak: "Here is the current time" Execute: "what is the time" Exit

Script Test

Script: "A Test" Variable: intent = "what is the weather" Neon Speak: "It is currently {skill("what is the weather", weather)}" Exit

Script: "Apple Navigator" Author: Neongecko Variable: options = table_scrape(https://apple.com) Variable: chosen = "" Neon speak: "Please tell me what apple.com web page you'd like to see. You can say things like {random(options)} or say quit or exit." LOOP WN ....voice_input(chosen) ....# Neon speak: "navigating to {chosen}" ....if {chosen} == "quit": ........Neon speak: "say pause to turn off the mic or say exit to close the window." ........voice_input(chosen) ........if {chosen} == "pause": ............# execute skill to turn off mic ............Execute: "neon mute microphone" ....else: ........if closest(chosen,options): ............Execute: "neon browse to {closest(chosen,options)}" ........else: ............Neon speak: "Page not found" ........Neon speak: "Tell me another Apple web page you'd like to see or say quit." LOOP WN END Exit

Script: "Basic Execute" Neon speak: "Lets get started." Execute: "What time is it" Neon speak: "I'm finished." Exit

Script: "Betsy" Variable: name Variable: more Name Speak: Betsy, "Welcome to the Neongecko Intro, My name is Betsy." Name Speak: Betsy, "What is your name?" voice_input(name) Name Speak: Betsy, "hi {name}" Name Speak: Betsy, " I am good at math. You can ask me questions like what is the log base 10 of 1 million" Name Speak: Betsy, "After this start up script exits, if your microphone and speakers are enabled, you can ask me questions out loud and hear my answers. Otherwise you can type questions in the dialog box above." EXIT

Script: "Cate" Variable: name Variable: more Language: en-in, female Name Speak: Cate, "Welcome to the Neongecko Intro, My name is Cate." Name Speak: Cate, "What is your name?" voice_input(name) Name Speak: Cate, "hi {name}" Name Speak: Cate, " I am a caffeine wiz! You can ask me the caffeine content of most popular USA drinks and boosters" Name Speak: Cate, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits." Exit

Script: "Convert Demo" Language: en-us, female Variable: quantity Variable: from_units Variable: to_units Variable: selected Variable: conversions = weight, volume, length, time, currency Neon speak: "Say convert {select_one(conversions)} to convert or exit when done" voice_input(selected,conversions) Neon speak: "How many units would you like to convert?" voice_input(quantity) Neon speak: "What are the units to convert from?" voice_input(from_units) Neon speak: "What are the units to convert to?" voice_input(to_units) Execute: "how many {to_units} are in {quantity} {from_units}" Exit

Script: "Covid 19" Language: "en-us male" @restartCovidScreening Name Speak: Robbie, "Version 20200709 17:40 Demo Covid-19 Screening Application" Variable: userName Variable: covidUserRef Variable: covidIll Variable: covidAge Variable: covidLifeThreat Variable: covidContact Variable: covidFever Variable: covidBreath Variable: covidSevereBreath Variable: covidCough Variable: covidSevereCough Variable: covidBP Variable: covidSevereBP Variable: covidNose Variable: covidThroat Variable: covidMuscle Variable: covidTaste Variable: covidFatigue Variable: covidNausea Variable: covidLungs Variable: covidHeart Variable: covidDiabetes Variable: covidNeuroCough Variable: covidWeakImmune Variable: covidDialysis Variable: covidLiver Variable: covidObesity Variable: covidPregnancy Variable: covidComorbiditiesCount Variable: covidNursingHome Variable: covidCareGiver Variable: True = 1 Variable: False = 0 Variable: yesNoList = "yes", "no" Variable: yesList = "yes", "sure", "very", "yup", "y" Variable: noList = "no", "not", "I don't have", "nope", "n" # {ignoreList = "I'm", "a", "the", "thanks", "thank you" # Prepositions and articles to ignore .. Variable: detailsList = "details", "more details", "tell me more" Variable: userSelfRefsList = "self", "myself", "me" Variable: userElseRefsList = "else", "someone else", "friend" Name Speak: Robbie, "This demonstration is based on the CDC's guide recommendations for Covid-19 phone screening, as of June 2020, and should not be considered a CDC or medically approved application at this time." # Name Speak: Robbie : "Some text to print and not speak." #GREETING @startCovidScreening Name Speak: Robbie, "Thank you for interacting with the demonstration Neon virtual examination room and Covid-19 conversational screening application beta test." Name Speak: Robbie, "My name is Neon Robbie." Name Speak: Robbie, "What is your name?" voice_input(userName) Name Speak: Robbie, "Hi {userName} . I am glad you chose to talk with me about Covid-19 symptoms." @promptMoreAppInfo Name Speak: Robbie, "Before starting the screening, would you like more information on the Neon conversational Covid-19 demo screening application?" voice_input(moreAppInfo) #if {moreAppInfo} !IN {yesNoList[*]}: # Goto: promptMoreAppInfo #if {moreAppInfo} IN {noList[*]}: if {moreAppInfo} IN {noList[*]}: Goto: BeginScreening Name Speak: Robbie, "The Neon conversational demonstration Covid-19 screening application is based on the Center for Disease Control and Prevention recommendations for the Coronavirus Disease 2019 Telephone Response Guide. The Covid-19 screening script is available at CDC dot gov website. https://www.cdc.gov/coronavirus/2019-ncov/hcp/phone-guide/ " @BeginScreening Name Speak: Robbie, "Your beta test virtual exam room is ready." Name Speak: Robbie, "In response to screening questions you can say details to hear more details." # Name Speak: Robbie, "or you can say previous question, or start over." @promptUserRef Name Speak: Robbie, "Are you asking for help for yourself or for someone else?" voice_input(covidUserRef) if {covidUserRef} IN {detailsList[*]}: Name Speak: Robbie, "For record keeping, we need to keep track of who we interact with." Goto: promptUserRef #if {covidUserRef} == "myself": if {covidUserRef} IN {userSelfRefsList[*]}: userRef1 = "have you" userRef2 = "are you" userRef3 = "do you" userRef1C = "Have you" userRef2C = "Are you" userRef3C = "Do you" else: if {covidUserRef} IN {userElseRefsList[*]}: userRef1 = "has the person you are calling about" userRef2 = "is the person for whom you are calling" userRef3 = "does the person you are calling about" userRef1C = "Has the person you are calling about" userRef2C = "Is the person for whom you are calling" userRef3C = "Does the person you are calling about" else Name Speak: Robbie, "Sorry {userName} I didn't get that." Goto: promptUserRef Name Speak: Robbie, "Got it {userName}." #TRIAGE @promptIll Name Speak: Robbie, "This audio guide is for people who are ill. {userRef2C} ill?" # "Are you ill (or contacting on behalf of someone who is ill)?" voice_input(covidIll) if {covidIll} IN {detailsList[*]}: Name Speak: Robbie, "We are demonstrating CDC's Covid-19 symptom screening for people who feel ill. If you are not showing symptoms of illness, then this screening system can not help you. If you are concerned you have Covid-19 infection you should contact your care advisor, since some people who have the Covid-19 infection are non-symptomatic." Goto: promptUserRef if {covidIll} IN {noList[*]}: Name Speak: Robbie, "You're not symptomatic of Covid-19 but if you are concerned you have Covid-19 infection you should contact your care advisor." Name Speak: Robbie, "Option for additional information on Covid-19 symptoms are in progress." Goto: A-noSymptoms # TODO: This could do something other than run exit, continue prompting? Ask to start over? Ask to check other symptoms? # Exit - Only for sick people else: if {covidIll} IN {yesList[*]}: Goto: promptAge else: if {covidIll} == "start over": Goto: startCovidScreening else: Goto: promptIll @promptAge Name Speak: Robbie, "This audio guide is for people over 5. How many years old {userRef2} ?" voice_input(covidAge) if {covidAge} IN {detailsList[*]}: Name Speak: Robbie, "This demonstration of conversational Covid-19 symptom screening is for people over the age of 5. Thank you for helping test the Neon Covid-19 screener." Goto: promptAge if {covidAge} < 5: Goto: C-lessThanFive else: if {covidAge} >= 5: Goto: promptLifeThreatening else: Goto: promptAge # LIFE THREATENING @promptLifeThreatening Name Speak: Robbie, "{userRef3C} have a life-threatening emergency medical condition? Say details for details." voice_input(covidLifeThreat) if {covidLifeThreat} IN {noList[*]}: Goto: promptContact else: # if {covidLifeThreat} == "details": if {covidLifeThreat} IN {detailsList[*]}: Name Speak: Robbie, "Life-threatening emergency medical conditions include these symptoms:" Name Speak: Robbie, "Extremely difficult breathing (can't talk without gasping for air); " Name Speak: Robbie, "Blue-colored lips or face; Severe, constant dizziness or lightheadedness; " Name Speak: Robbie, "Acting confused or inability to arouse; new or worsening slurred speech;" Name Speak: Robbie, "New onset of seizures or seizures that won't stop; and " Name Speak: Robbie, "Other life-threatening emergency signs." Name Speak: Robbie, "Anyone with a life-threatening emergency should immediately call 911." Name Speak: Robbie, "Thank you for helping test the Neon Covid-19 screener." Goto: promptLifeThreatening if {covidLifeThreat} !IN {yesList[*]}: Goto: promptLifeThreatening Goto: B-call911 # SCREEN FOR SYMPTOMS @promptContact Name Speak: Robbie, "In the two weeks leading up to feeling sick {userRef1} had contact with someone who was diagnosed with COVID-19, or live in or recently visited a place where COVID-19 is spreading?" voice_input(covidContact) if {covidContact} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of known contacts to people or places that expose them to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptContact if {covidContact} IN {noList[*]}: covidContact = {False} else: if {covidContact} !IN {yesList[*]}: Goto: promptContact covidContact = {True} # SYMPTOMS @promptFever Name Speak: Robbie, "{userRef3C} have a fever or felt hot or feverish in the last two days?" voice_input(covidFever) if {covidFever} IN {detailsList[*]}: Name Speak: Robbie, "People with a fever over 100.4, and trouble breathing, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. For fever-reducing medications acetaminophen is recommended (for example Tylenol). Thank you for helping test the Neon Covid-19 screener." Goto: promptFever if {covidFever} IN {noList[*]}: covidFever = {False} else: if {covidFever} !IN {yesList[*]}: Goto: promptFever covidFever = {True} # Add - # Ask "Were you able to measure the temperature with a thermometer?" # Yes: Ask "What was the temperature and when was it measured?" # If No: Ask "Are you/they experiencing shaking, chills, or sweating? Do you/they feel very warm to the touch?" # Ask "When did the fever/feverishness start?" # Ask "Was fever-reducing medication given?" # Details: WHO recommends acetaminophen (for example Tylenol). NOT nonsteroidal anti-inflammatory drugs, NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # Details: Examples of fever-reducing medications include acetaminophen (for example Tylenol) and nonsteroidal anti-inflammatory drugs, or NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # If Yes: Ask "How long ago was the medication taken?" @promptBreath Name Speak: Robbie, "{userRef3C} have shortness of breath?" voice_input(covidBreath) if {covidBreath} IN {detailsList[*]}: Name Speak: Robbie, "People with trouble breathing and a fever over 100.4, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptBreath if {covidBreath} IN {noList[*]}: covidBreath = {False} covidSevereBreath = {False} else: if {covidBreath} !IN {yesList[*]}: Goto: promptBreath covidBreath = {True} @promptSevereBreath Name Speak: Robbie, "{userRef3C} have severe shortness of breath, such as difficulty talking or walking across the room without stopping to breath, or fainting?" voice_input(covidSevereBreath) if {covidSevereBreath} IN {yesList[*]} : covidSevereBreath = {True} Name Speak: Robbie, "People having severe shortness of breath need urgent care and should call 911 or immediately go to the emergency department." Goto: B-call911 else: if {covidSevereBreath} !IN {noList[*]}: Goto: promptSevereBreath covidSevereBreath = {False} @promptCough Name Speak: Robbie, "{userRef3C} have a cough?" voice_input(covidCough) if {covidCough} IN {detailsList[*]}: Name Speak: Robbie, "People with a cough, trouble breathing, persistent pain or pressure in the chest, and a fever over 100.4, or bluish lips or face, or new confusion, or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptCough if {covidCough} IN {noList[*]}: covidCough = {False} covidSevereCough = {False} else: if {covidCough} !IN {yesList[*]}: Goto: promptCough covidCough = {True} @promptSevereCough Name Speak: Robbie, "{userRef1C} coughed up a teaspoon of blood?" voice_input(covidSevereCough) if {covidSevereCough} IN {yesList[*]} : covidSevereCough = {True} Name Speak: Robbie, "People having severe coughing (termed hemoptysis) should go to the emergency department." Goto : D-gotoEmergency if {covidSevereCough} !IN {noList[*]}: Goto: promptSevereCough covidSevereCough = {False} @promptBP Name Speak: Robbie, "{userRef3C} have low blood pressure? Signs of low blood pressure can include cold, pale, or clammy skin; or feeling too light-headed and too weak to stand." voice_input(covidBP) if {covidBP} IN {detailsList[*]}: Name Speak: Robbie, "People with a symptom of very low blood pressure, such as new confusion or fainting or being too weak to stand, should immediately seek emergency medical care. Thank you for helping test the Neon Covid-19 screener." Goto: promptBP if {covidBP} IN {noList[*]}: covidBP = {False} covidSevereBP = {False} else: if {covidBP} !IN {yesList[*]}: Goto: promptBP covidBP = {True} @promptSevereBP Name Speak: Robbie, "{userRef3C} have severe low BP hypotension such as not being able to stand?" voice_input(covidSevereBP) if {covidSevereBP} IN {yesList[*]} : covidSevereBP = {True} Name Speak: Robbie, "People having severe low blood pressure symptoms should go to the emergency department." Goto : D-gotoEmergency if {covidSevereBP} !IN {noList[*]}: Goto: promptSevereBP covidSevereBP = {False} @promptNose Name Speak: Robbie, "{userRef3C} have a runny or stuffy nose?" voice_input(covidNose) if {covidNose} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNose if {covidNose} IN {noList[*]}: covidNose = {False} else: if {covidNose} !IN {yesList[*]}: Goto: promptNose covidNose = {True} @promptThroat Name Speak: Robbie, "{userRef3C} have a sore throat?" voice_input(covidThroat) if {covidThroat} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptThroat if {covidThroat} IN {noList[*]}: covidThroat = {False} else: if {covidThroat} !IN {yesList[*]}: Goto: promptThroat covidThroat = {True} @promptMuscle Name Speak: Robbie, "{userRef3C} have muscle aches or pains?" voice_input(covidMuscle) if {covidMuscle} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptMuscle if {covidMuscle} IN {noList[*]}: covidMuscle = {False} else: if {covidMuscle} !IN {yesList[*]}: Goto: promptMuscle covidMuscle = {True} @promptTaste Name Speak: Robbie, "{userRef3C} have a new loss of taste or smell?" voice_input(covidTaste) if {covidTaste} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptTaste if {covidTaste} IN {noList[*]}: covidTaste = {False} else: if {covidTaste} !IN {yesList[*]}: Goto: promptTaste covidTaste = {True} @promptFatigue Name Speak: Robbie, "{userRef3C} have unusual tiredness, fatigue or malaise?" voice_input(covidFatigue) if {covidFatigue} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptFatigue if {covidFatigue} IN {noList[*]}: covidFatigue = {False} else: if {covidFatigue} !IN {yesList[*]}: Goto: promptFatigue covidFatigue = {True} @promptNausea Name Speak: Robbie, "{userRef3C} have nausea, vomiting, or diarrhea" voice_input(covidNausea) if {covidNausea} IN {detailsList[*]}: Name Speak: Robbie, "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNausea if {covidNausea} IN {noList[*]}: covidNausea = {False} else: if {covidNausea} !IN {yesList[*]}: Goto: promptNausea covidNausea = {True} #HIGH RISK Name Speak: Robbie, "I am now going to ask questions about ongoing medical conditions including pregnancy." @promptLungs Name Speak: Robbie, "{userRef3C} have chronic lung diseases?" # Details: "like asthma, chronic obstructive pulmonary disease [chronic bronchitis or emphysema], or other chronic conditions associated with impaired lung function or that require home oxygen?" voice_input(covidLungs) if {covidLungs} IN {detailsList[*]}: Name Speak: Robbie, "Chronic lung diseases include asthma, chronic obstructive pulmonary disease, chronic bronchitis or emphysema, or other chronic conditions associated with impaired lung function or that require home oxygen. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLungs if {covidLungs} IN {noList[*]}: covidLungs = {False} else: if {covidLungs} !IN {yesList[*]}: Goto: promptLungs covidLungs = {True} @promptHeart Name Speak: Robbie, "{userRef3C} have congestive heart failure?" voice_input(covidHeart) if {covidHeart} IN {detailsList[*]}: Name Speak: Robbie, "Congestive heart failure includes coronary artery blockage, heart attack, valve disease or congenital heart disease, and resulting in the heart not being able to pump efficiently and reduced blood flow. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptHeart if {covidHeart} IN {noList[*]}: covidHeart = {False} else: if {covidHeart} !IN {yesList[*]}: Goto: promptHeart covidHeart = {True} @promptDiabetes Name Speak: Robbie, "{userRef3C} have diabetes with complications?" # Details: "like limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially if they have uncontrolled diabetes or other complications?" voice_input(covidDiabetes) if {covidDiabetes} IN {detailsList[*]}: Name Speak: Robbie, "Complications of diabetes include limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially uncontrolled diabetes or other complications. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptDiabetes if {covidDiabetes} IN {noList[*]}: covidDiabetes = {False} else: if {covidDiabetes} !IN {yesList[*]}: Goto: promptDiabetes covidDiabetes = {True} @promptNeuroCough Name Speak: Robbie, "{userRef3C} have neurological conditions that weaken ability to cough?" # Details: "like disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury voice_input(covidNeuroCough) if {covidNeuroCough} IN {detailsList[*]}: Name Speak: Robbie, "Neurological conditions that weaken ability to cough include disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNeuroCough if {covidNeuroCough} IN {noList[*]}: covidNeuroCough = {False} else: if {covidNeuroCough} !IN {yesList[*]}: Goto: promptNeuroCough covidNeuroCough = {True} @promptWeakImmune Name Speak: Robbie, "{userRef3C} have a weakened immune system?" voice_input(covidWeakImmune) if {covidWeakImmune} IN {detailsList[*]}: Name Speak: Robbie, "A weakened immune system includes seeing a doctor for cancer and treatment such as chemotherapy or radiation, receiving an organ or bone marrow transplant, taking high doses of oral steroids or other immunosuppressant medications, HIV or AIDS. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptWeakImmune if {covidWeakImmune} IN {noList[*]}: covidWeakImmune = {False} else: if {covidWeakImmune} !IN {yesList[*]}: Goto: promptImmune covidWeakImmune = {True} @promptDialysis Name Speak: Robbie, "{userRef3C} have dialysis or under treatment for a kidney disease?" voice_input(covidDialysis) if {covidDialysis} IN {detailsList[*]}: Name Speak: Robbie, "Dialysis includes any type of dialysis, and kidney diseases are not specified in the CDC guide recommendations. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptDialysis if {covidDialysis} IN {noList[*]}: covidDialysis = {False} else: if {covidDialysis} !IN {yesList[*]}: Goto: promptDialysis covidDialysis = {True} @promptLiver Name Speak: Robbie, "{userRef3C} have cirrhosis of the liver, chronic hepatitis or other liver disease?" voice_input(covidLiver) if {covidLiver} IN {detailsList[*]}: Name Speak: Robbie, "Liver disease includes cirrhosis of the liver, chronic hepatitis or other liver disease, not are not specified in the CDC Covid-19 screening guide recommendations. Additional details in progress. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLiver if {covidLiver} IN {noList[*]}: covidLiver = {False} else: if {covidLiver} !IN {yesList[*]}: Goto: promptLiver covidLiver = {True} @promptObesity Name Speak: Robbie, "{userRef3C} have extreme obesity?" voice_input(covidObesity) if {covidObesity} IN {detailsList[*]}: Name Speak: Robbie, "Extreme obesity is Body Mass Index [BMI] greater than or equal to 40. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptObesity if {covidObesity} IN {noList[*]}: covidObesity = {False} else: if {covidObesity} !IN {yesList[*]}: Goto: promptObesity covidObesity = {True} @promptPregnancy Name Speak: Robbie, "{userRef3C} have a current pregnancy or pregnant in the last 2 weeks?" voice_input(covidPregnancy) if {covidPregnancy} IN {detailsList[*]}: Name Speak: Robbie, "Pregnancy and recent pregnancy are considered ongoing medical conditions in the CDC Covid-19 screening guide. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptPregnancy if {covidPregnancy} IN {noList[*]}: covidPregnancy = {False} else: if {covidPregnancy} !IN {yesList[*]}: Goto: promptPregnancy covidPregnancy = {True} # CALCULATE COMORBIDITIES AND ADVERSE RISKS Python: covidComorbiditiesCount = {covidLungs} + {covidHeart} + {covidDiabetes} + {covidNeuroCough} + {covidDialysis} + {covidLiver} + {covidObesity} + {covidPregnancy} if {covidComorbiditiesCount} >0 : Name Speak: Robbie, "Important! You've reported significant underlying medical conditions and illness symptoms you are advised to contact a care provider and be seen within 24 hours." # Add - Collect details? .. If history appears unreliable: Screen for other medical conditions. "Please tell me about any medicine that you/sick person take(s) daily or regularly." Ask about current medications that might indicate underlying chronic conditions. # CHECK IF CAREGIVER OR LIVING IN FACILITY @promptNursingHome Name Speak: Robbie, "{userRef3C} live in a nursing home or other long-term care facility?" voice_input(covidNursingHome) if {covidNursingHome} IN {noList[*]}: covidNursingHome = {False} else: if {covidNursingHome} !IN {yesList[*]}: Goto: promptNursingHome covidNursingHome = {True} covidCareGiver = {False} Name Speak: Robbie, "It is important that you immediately report these symptoms to your nursing home or care facility immediately, including shortness of breath, fever or cough." Goto: G-careFacilityReport @promptCareGiver Name Speak: Robbie, "{userRef3C} been involved as a worker, student or volunteer at a health care setting in the last two weeks?" # Details: in the last two weeks worked or volunteered in a hospital, emergency room, clinic, medical office, ambulance service, first responder services, or any health care setting, or taken care of patients as a student as a part of your/their work? voice_input(covidCareGiver) if {covidCareGiver} IN {noList[*]}: covidCareGiver = {False} else: if {covidCareGiver} !IN {yesList[*]}: Goto: promptCareGiver covidCareGiver = {True} Name Speak: Robbie, "It is important that you immediately report your symptoms to the occupational health provider for the care facility where you were involved, including shortness of breath, fever or respiratory symptoms." Goto: F-careGiverReport # List Symptoms, Comorbidities & Risks Name Speak: Robbie, "Would you like me to list your information including Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: checkDispositions Name Speak: Robbie, "I will list your information. Would you like me to read out loud?" voice_input(userInput) if {userInput} IN {noList[*]}: varNoSpeak = "" else varNoSpeak = "" varProsody = "rate='x-fast'" Name Speak: Robbie, "{varNoSpeak} User Name {userName} " Name Speak: Robbie, "{varNoSpeak} User Ref {covidUserRef} " Name Speak: Robbie, "{varNoSpeak} User Ill {covidIll} " Name Speak: Robbie, "{varNoSpeak} User Age {covidAge} " Name Speak: Robbie, "{varNoSpeak} Life Threat {covidLifeThreat} " Name Speak: Robbie, "{varNoSpeak} Contact {covidContact} " Name Speak: Robbie, "{varNoSpeak} Fever {covidFever} " Name Speak: Robbie, "{varNoSpeak} Breathing {covidBreath} " Name Speak: Robbie, "{varNoSpeak} Severe Breathing {covidSevereBreath} " Name Speak: Robbie, "{varNoSpeak} Cough {covidCough} " Name Speak: Robbie, "{varNoSpeak} Severe Cough {covidSevereCough} " Name Speak: Robbie, "{varNoSpeak} BP {covidBP} " Name Speak: Robbie, "{varNoSpeak} Severe BP {covidSevereBP} " Name Speak: Robbie, "{varNoSpeak} Nose {covidNose} " Name Speak: Robbie, "{varNoSpeak} Throat {covidThroat} " Name Speak: Robbie, "{varNoSpeak} Muscle {covidMuscle} " Name Speak: Robbie, "{varNoSpeak} Taste {covidTaste} " Name Speak: Robbie, "{varNoSpeak} Fatigue {covidFatigue} " Name Speak: Robbie, "{varNoSpeak} Nausea {covidNausea} " Name Speak: Robbie, "{varNoSpeak} Comorbidities " Name Speak: Robbie, "{varNoSpeak} Lungs {covidLungs} " Name Speak: Robbie, "{varNoSpeak} Heart {covidHeart} " Name Speak: Robbie, "{varNoSpeak} Diabetes {covidDiabetes} " Name Speak: Robbie, "{varNoSpeak} Neuro Cough {covidNeuroCough} " Name Speak: Robbie, "{varNoSpeak} Weakened Immune {covidWeakImmune} " Name Speak: Robbie, "{varNoSpeak} Dialysis {covidDialysis} " Name Speak: Robbie, "{varNoSpeak} Liver {covidLiver} " Name Speak: Robbie, "{varNoSpeak} Obesity {covidObesity} " Name Speak: Robbie, "{varNoSpeak} Pregnancy {covidPregnancy} " Name Speak: Robbie, "{varNoSpeak} Comorbidities Total {covidComorbiditiesCount} " Name Speak: Robbie, "{varNoSpeak} Nursing Home or Facility {covidNursingHome} " Name Speak: Robbie, "{varNoSpeak} Care Giving {covidCareGiver} " @checkDispositions Name Speak: Robbie, "Neon AI test - Checking for Dispositions for the reported symptoms." # CALCULATE D-gotoEmergency DISPOSITION Python: covidEmergencyCount = {covidSevereBreath} + {covidSevereCough} + {covidSevereBP} if {covidEmergencyCount} >0 : Name Speak: Robbie, "People with these severe symptoms are advised to immediately go to the Emergency Department." Goto: D-gotoEmergency # CALCULATE E-callMedicalProvider DISPOSITION # TODO: '*' is not a valid character Python: covidProvider24Count = {covidBreath} + ( {covidFever} * {covidComorbiditiesCount} ) + ( {covidCough} * {covidComorbiditiesCount} ) if {covidProvider24Count} >0 : Name Speak: Robbie, "People with the reported symptoms are advised to call a medical provider within 24 hours, and are encouraged to participate in tele-health options from their health care provider." Goto: E-callMedicalProvider # CALCULATE BREATHING DISPOSITIONS if {covidBreath}: if {covidComorbiditiesCount} >= 1: Goto: B-call911 Goto: D-gotoEmergency # CALCULATE H-selfCare DISPOSITION Python: covidStayHomeCount = {covidFever} + {covidFever} + {covidCough} if {covidStayHomeCount} >0 : Name Speak: Robbie, "People with the reported symptoms are advised to stay home and call their health care provider if they get worse, and are encouraged to participate in tele-health options from their health care provider." Goto: H-selfCare # TODO: Goto line here to catch no response, different response for completion vs not ill DM # NO SYMPTOMS - A @A-noSymptoms Name Speak: Robbie, "The Neon AI triage service is intended for people who are ill or caring for someone who is ill. For general information about coronavirus disease 2019 (COVID-19), please refer to the Centers for Disease Control and Prevention (CDC) website. Do you have something to write with? The CDCs website is www.cdc.gov/COVID19." Goto: promptCreateReport #CALL 911 - B @B-call911 Name Speak: Robbie, "Immediate medical attention is needed. You need to call 911 now. Tell the 911 operator if you have been in contact with someone with COVID-19 or if you have recently been to an area where COVID-19 is spreading." Goto: promptCreateReport #CHILD LESS THAN 5 YEARS OLD - C @C-lessThanFive Name Speak: Robbie, "This triage line is intended for children who are at least five years old and adults. If your child is younger than five years old and is sick, please contact their medical provider as soon as possible. If your child has had contact with a person who is sick with COVID-19 or has been in an area with community spread of COVID-19, please let their medical providers know." Goto: promptCreateReport #GO TO EMERGENCY DEPARTMENT - D @D-gotoEmergency Name Speak: Robbie, "Urgent medical attention is needed. You need to go to your nearest emergency department. If you have had contact with a person who is sick with COVID-19 or you have been in an area with community spread of COVID-19, please let your medical providers know as soon as you arrive at the emergency department." Goto: promptCreateReport #CONTACT MEDICAL PROVIDER WITHIN 24 HOURS - E @E-gotoMedicalProvider Name Speak: Robbie, "You have some symptoms that may be related to COVID-19. Stay home except to get medical care. Separate yourself from others in your home. Wear a facemask, if possible. Clean your hands often. Avoid sharing personal household items. Clean all high-touch surfaces everyday. Monitor your symptoms and seek prompt medical attention if your illness is worsening." Goto: promptCreateReport #CONTACT OCCUPATIONAL HEALTH PROVIDER AT WORK - F @F-careGiverReport Name Speak: Robbie, "Contact an occupational health provider in your healthcare facility as soon as possible. If you have cared for a person who is sick with COVID-19 or have been in an area with community spread of COVID-19, please let your occupational health provider know as soon as you speak with them." Goto: promptCreateReport #CONTACT HEALTHCARE PROVIDER IN LONG TERM CARE FACILITY - G @G-careFacilityReport Name Speak: Robbie, "You may be at higher risk for severe illness since you live in a nursing home or a long-term care facility. Tell a caregiver at the facility that you are sick and need to see a medical provider as soon as possible." Goto: promptCreateReport #STAY HOME AND TAKE CARE OF YOURSELF. CONTACT PROVIDER IF THINGS GET WORSE - H @H-selfCare Name Speak: Robbie, "Sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # Not Done Yet - Z @Z-inProgress Name Speak: Robbie, "I'm sorry {userName} I'm not programmed for that answer yet. I'm sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # CREATE REPORT @promptCreateReport Name Speak: Robbie, "Would you like me to send you an email with the information you have reported today, including User info, Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: screeningComplete Variable: screeningReport screeningReport = "User Name {userName} " screeningReport = "{screeningReport}, User Ref {covidUserRef} " screeningReport = "{screeningReport}, Ill {covidIll} " screeningReport = "{screeningReport}, Age {covidAge} " screeningReport = "{screeningReport}, Life Threat {covidLifeThreat} " screeningReport = "{screeningReport}, Contact {covidContact} " screeningReport = "{screeningReport} \nSymptoms \n" screeningReport = "{screeningReport}Fever {covidFever} " screeningReport = "{screeningReport}, Breathing {covidBreath} " screeningReport = "{screeningReport}, Severe Breathing {covidSevereBreath} " screeningReport = "{screeningReport}, Cough {covidCough} " screeningReport = "{screeningReport}, Severe Cough {covidSevereCough} " screeningReport = "{screeningReport}, BP {covidBP} " screeningReport = "{screeningReport}, Severe BP {covidSevereBP} " screeningReport = "{screeningReport}, Nose {covidNose} " screeningReport = "{screeningReport}, Throat {covidThroat} " screeningReport = "{screeningReport}, Muscle {covidMuscle} " screeningReport = "{screeningReport}, Taste {covidTaste} " screeningReport = "{screeningReport}, Fatigue {covidFatigue} " screeningReport = "{screeningReport}, Nausea {covidNausea} " screeningReport = "{screeningReport} \nComorbidities \n" screeningReport = "{screeningReport}Lungs {covidLungs} " screeningReport = "{screeningReport}, Heart {covidHeart} " screeningReport = "{screeningReport}, Diabetes {covidDiabetes} " screeningReport = "{screeningReport}, Neuro Cough {covidNeuroCough} " screeningReport = "{screeningReport}, Weakened Immune {covidWeakImmune} " screeningReport = "{screeningReport}, Dialysis {covidDialysis} " screeningReport = "{screeningReport}, Liver {covidLiver} " screeningReport = "{screeningReport}, Obesity {covidObesity} " screeningReport = "{screeningReport}, Pregnancy {covidPregnancy} " screeningReport = "{screeningReport} \nComorbidities Total {covidComorbiditiesCount} \n" screeningReport = "{screeningReport}Nursing Home or Facility {covidNursingHome} " screeningReport = "{screeningReport}, Care Giving {covidCareGiver} " Name Speak: Robbie, "This is your Screening Report {screeningReport}" Name Speak: Robbie, "Report ready to email. Say cancel to not send the email, or say send to send." voice_input(userInput) if {userInput} == "cancel": Goto: screeningComplete Email: "Neon COVID Screening Report", screeningReport @screeningComplete Name Speak: Robbie, "Would you like to restart the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList}: Name Speak: Robbie, "Would you like to erase all your answers before restarting the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList[*]}: Name Speak: Robbie, "Erasing current test answers and restarting." Goto: restartCovidScreening Name Speak: Robbie, "Restarting screening test with current test answers." Goto: startCovidScreening Name Speak: Robbie, "Thank you {userName} for testing the Neon AI Conversational Covid 19 Screening Script. Robbie, signing off." Name Speak: Robbie, "Would you like to test the Neon AI Patient Assistant Script?" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Robbie, "Transferring to Pat, our Patient Assistant demonstration. Goodbye {userName}." Execute : "Run the patient assistant script" # Name Speak: Robbie,"Neon run the Patient Assistant script starting at SCRIPTENTRY" exit # Name Speak: Robbie, "Lastly, would you like to test the Neon AI Conversational Script Menu?" # voice_input(askReturnValue) # if {askReturnValue} IN {yesList[*]}: # Name Speak: Robbie, "Transferring to Otto, our Conversational Script Menu Assistant demonstration. Goodbye {userName}." # Name Speak: Robbie, "Neon run the script menu script starting at SCRIPTENTRY" # exit Name Speak: Robbie, "Thank you {userName} for helping me practice my conversational skills and letting me practice help you." exit

Script: "Covid 19 Audio" Language: en-us, male @restartCovidScreening Name Speak: "Robbie", "Version 20200709 17-40 Demo Covid-19 Screening Application" Variable: userName Variable: covidUserRef Variable: covidIll Variable: covidAge Variable: covidLifeThreat Variable: covidContact Variable: covidFever Variable: covidBreath Variable: covidSevereBreath Variable: covidCough Variable: covidSevereCough Variable: covidBP Variable: covidSevereBP Variable: covidNose Variable: covidThroat Variable: covidMuscle Variable: covidTaste Variable: covidFatigue Variable: covidNausea Variable: covidLungs Variable: covidHeart Variable: covidDiabetes Variable: covidNeuroCough Variable: covidWeakImmune Variable: covidDialysis Variable: covidLiver Variable: covidObesity Variable: covidPregnancy Variable: covidComorbiditiesCount Variable: covidNursingHome Variable: covidCareGiver Variable: True = 1 Variable: False = 0 Variable: yesNoList = "yes", "no" Variable: yesList = "yes", "sure", "very", "yup", "y" Variable: noList = "no", "not", "I don't have", "nope", "n" # {ignoreList} = "I'm", "a", "the", "thanks", "thank you" # Prepositions and articles to ignore .. Variable: detailsList = "details", "more details", "tell me more" Variable: userSelfRefsList = "self", "myself", "me" Variable: userElseRefsList = "else", "someone else", "friend" Name Speak: "Robbie", "This demonstration is based on the CDC's guide recommendations for Covid-19 phone screening, as of June 2020, and should not be considered a CDC or medically approved application at this time." # Name Speak: Robbie : "Some text to print and not speak." #GREETING @startCovidScreening Name Speak: "Robbie", "Thank you for interacting with the demonstration Neon virtual examination room and Covid-19 conversational screening application beta test." Name Speak: "Robbie", "My name is Neon Robbie." Name Speak: "Robbie", "What is your name?" voice_input(userName) Name Reconvey: "Robbie", "Hi {userName}", "Hi" Name Reconvey: "Robbie", "I am glad you chose to talk with me about Covid-19 symptoms." @promptMoreAppInfo Name Speak: "Robbie", "Before starting the screening, would you like more information on the Neon conversational Covid-19 demo screening application?" voice_input(moreAppInfo) #if {moreAppInfo} !IN {yesNoList[*]}: # Goto: promptMoreAppInfo #if {moreAppInfo} IN {noList[*]}: if {moreAppInfo} IN {noList[*]}: Goto: BeginScreening Name Speak: "Robbie", "The Neon conversational demonstration Covid-19 screening application is based on the Center for Disease Control and Prevention recommendations for the Coronavirus Disease 2019 Telephone Response Guide. The Covid-19 screening script is available at CDC dot gov website. https://www.cdc.gov/coronavirus/2019-ncov/hcp/phone-guide/ " @BeginScreening Name Speak: "Robbie", "Your beta test virtual exam room is ready." Name Reconvey: "Robbie", "In response to screening questions you can say details to hear more details.", "Say details for details" # Name Speak: "Robbie", "or you can say previous question, or start over." @promptUserRef Name Reconvey: "Robbie", "Are you asking for help for yourself, or for someone else?" voice_input(covidUserRef) if {covidUserRef} IN {detailsList[*]}: Name Speak: "Robbie", "For record keeping, we need to keep track of who we interact with." Goto: promptUserRef #if {covidUserRef} == "myself": if {covidUserRef} IN {userSelfRefsList[*]}: userRef1 = "have you" userRef2 = "are you" userRef3 = "do you" userRef1C = "Have you" userRef2C = "Are you" userRef3C = "Do you" else: if {covidUserRef} IN {userElseRefsList[*]}: userRef1 = "has the person you are calling about" userRef2 = "is the person for whom you are calling" userRef3 = "does the person you are calling about" userRef1C = "Has the person you are calling about" userRef2C = "Is the person for whom you are calling" userRef3C = "Does the person you are calling about" else Name Reconvey: "Robbie", "Sorry {userName} I didn't get that.", "I didn't get that." Goto: promptUserRef Name Reconvey: "Robbie", "Got it {userName}.", "Got it" #TRIAGE @promptIll # Name Speak: "Robbie", "This audio guide is for people who are ill. {userRef2C} ill?" Name Reconvey: "Robbie", "This audio guide is for people who are ill" Name Reconvey: "Robbie", "Are you ill of contacting on behalf of someone who is ill?" # "Are you ill (or contacting on behalf of someone who is ill)?" voice_input(covidIll) if {covidIll} IN {detailsList[*]}: Name Reconvey: "Robbie", "We are demonstrating CDC's Covid-19 symptom screening for people who feel ill." Name Reconvey: "Robbie", "If you are not showing symptoms of illness, then this screening system can not help you." Name Reconvey: "Robbie", "If you are concerned you have Covid-19 infection you should contact your care advisor, since some people who have the Covid-19 infection are non-symptomatic." Goto: promptUserRef if {covidIll} IN {noList[*]}: Name Speak: "Robbie", "You're not symptomatic of Covid-19 but if you are concerned you have Covid-19 infection you should contact your care advisor." Name Speak: "Robbie", "Option for additional information on Covid-19 symptoms are in progress." Goto: A-noSymptoms # TODO: This could do something other than run exit, continue prompting? Ask to start over? Ask to check other symptoms? # Exit - Only for sick people else: if {covidIll} IN {yesList[*]}: Goto: promptAge else: if {covidIll} == "start over": Goto: startCovidScreening else: Goto: promptIll @promptAge Name Reconvey: "Robbie", "This audio guide is for people over 5. How many years old are you or the person you are calling about?" voice_input(covidAge) if {covidAge} IN {detailsList[*]}: Name Speak: "Robbie", "This demonstration of conversational Covid-19 symptom screening is for people over the age of 5. Thank you for helping test the Neon Covid-19 screener." Goto: promptAge if {covidAge} < 5: Goto: C-lessThanFive else: if {covidAge} >= 5: Goto: promptLifeThreatening else: Goto: promptAge # LIFE THREATENING @promptLifeThreatening Name Speak: "Robbie", "{userRef3C} have a life-threatening emergency medical condition? Say details for details." voice_input(covidLifeThreat) if {covidLifeThreat} IN {noList[*]}: Goto: promptContact else: # if {covidLifeThreat} == "details": if {covidLifeThreat} IN {detailsList[*]}: Name Speak: "Robbie", "Life-threatening emergency medical conditions include these symptoms:" Name Speak: "Robbie", "Extremely difficult breathing (can't talk without gasping for air); " Name Speak: "Robbie", "Blue-colored lips or face; Severe, constant dizziness or lightheadedness; " Name Speak: "Robbie", "Acting confused or inability to arouse; new or worsening slurred speech;" Name Speak: "Robbie", "New onset of seizures or seizures that won't stop; and " Name Speak: "Robbie", "Other life-threatening emergency signs." Name Speak: "Robbie", "Anyone with a life-threatening emergency should immediately call 911." Name Speak: "Robbie", "Thank you for helping test the Neon Covid-19 screener." Goto: promptLifeThreatening if {covidLifeThreat} !IN {yesList[*]}: Goto: promptLifeThreatening Goto: B-call911 # SCREEN FOR SYMPTOMS @promptContact Name Speak: "Robbie", "In the two weeks leading up to feeling sick {userRef1} had contact with someone who was diagnosed with COVID-19, or live in or recently visited a place where COVID-19 is spreading?" voice_input(covidContact) if {covidContact} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of known contacts to people or places that expose them to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptContact if {covidContact} IN {noList[*]}: covidContact = {False} else: if {covidContact} !IN {yesList[*]}: Goto: promptContact covidContact = {True} # SYMPTOMS @promptFever Name Speak: "Robbie", "{userRef3C} have a fever or felt hot or feverish in the last two days?" voice_input(covidFever) if {covidFever} IN {detailsList[*]}: Name Speak: "Robbie", "People with a fever over 100.4, and trouble breathing, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. For fever-reducing medications acetaminophen is recommended (for example Tylenol). Thank you for helping test the Neon Covid-19 screener." Goto: promptFever if {covidFever} IN {noList[*]}: covidFever = {False} else: if {covidFever} !IN {yesList[*]}: Goto: promptFever covidFever = {True} # Add - # Ask "Were you able to measure the temperature with a thermometer?" # Yes: Ask "What was the temperature and when was it measured?" # If No: Ask "Are you/they experiencing shaking, chills, or sweating? Do you/they feel very warm to the touch?" # Ask "When did the fever/feverishness start?" # Ask "Was fever-reducing medication given?" # Details: WHO recommends acetaminophen (for example Tylenol). NOT nonsteroidal anti-inflammatory drugs, NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # Details: Examples of fever-reducing medications include acetaminophen (for example Tylenol) and nonsteroidal anti-inflammatory drugs, or NSAIDs, for example ibuprofen (like Advil), naproxen (like Aleve), aspirin, and others. # If Yes: Ask "How long ago was the medication taken?" @promptBreath # TODO: Breath Audio here Name Speak: "Robbie", "{userRef3C} have shortness of breath?" voice_input(covidBreath) if {covidBreath} IN {detailsList[*]}: Name Speak: "Robbie", "People with trouble breathing and a fever over 100.4, persistent pain or pressure in the chest, bluish lips or face, or new confusion or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptBreath if {covidBreath} IN {noList[*]}: covidBreath = {False} covidSevereBreath = {False} else: if {covidBreath} !IN {yesList[*]}: Goto: promptBreath covidBreath = {True} @promptSevereBreath # TODO: Severe Breath Audio here Name Speak: "Robbie", "{userRef3C} have severe shortness of breath, such as difficulty talking or walking across the room without stopping to breath, or fainting?" voice_input(covidSevereBreath) if {covidSevereBreath} IN {yesList[*]} : covidSevereBreath = {True) Name Speak: "Robbie", "People having severe shortness of breath need urgent care and should call 911 or immediately go to the emergency department." Goto: B-call911 else: if {covidSevereBreath} !IN {noList[*]}: Goto: promptSevereBreath covidSevereBreath = {False} @promptCough if {userRef3C} == "Do you": Name Reconvey: "Robbie", "Do you have a cough?" else: Name Reconvey: "Robbie", "Does the person you are calling about have a cough?" voice_input(covidCough) if {covidCough} IN {detailsList[*]}: Name Speak: "Robbie", "People with a cough, trouble breathing, persistent pain or pressure in the chest, and a fever over 100.4, or bluish lips or face, or new confusion, or fainting, should immediately seek emergency medical care, should limit contact with others and be tested for Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptCough if {covidCough} IN {noList[*]}: covidCough = {False} covidSevereCough = {False} else: if {covidCough} !IN {yesList[*]}: Goto: promptCough covidCough = {True} @promptSevereCough if {userRef1C} == "Have you": Name Reconvey: "Robbie", "Have you coughed up a teaspoon of blood?" else: Name Reconvey: "Robbie", "Has the person you are calling about coughed up a teaspoon of blood?" voice_input(covidSevereCough) if {covidSevereCough} IN {yesList[*]} : covidSevereCough = {True} Name Speak: "Robbie", "People having severe coughing (termed hemoptysis) should go to the emergency department." Goto : D-gotoEmergency if {covidSevereCough} !IN {noList[*]}: Goto: promptSevereCough covidSevereCough = {False} @promptBP # TODO: Low BP Audio here Name Speak: "Robbie", "{userRef3C} have low blood pressure? Signs of low blood pressure can include cold, pale, or clammy skin; or feeling too light-headed and too weak to stand." voice_input(covidBP) if {covidBP} IN {detailsList[*]}: Name Speak: "Robbie", "People with a symptom of very low blood pressure, such as new confusion or fainting or being too weak to stand, should immediately seek emergency medical care. Thank you for helping test the Neon Covid-19 screener." Goto: promptBP if {covidBP} IN {noList[*]}: covidBP = {False} covidSevereBP = {False} else: if {covidBP} !IN {yesList[*]}: Goto: promptBP covidBP = {True} @promptSevereBP Name Speak: "Robbie", "{userRef3C} have severe low BP hypotension such as not being able to stand?" voice_input(covidSevereBP) if {covidSevereBP} IN {yesList[*]} : covidSevereBP = {True} Name Speak: "Robbie", "People having severe low blood pressure symptoms should go to the emergency department." Goto : D-gotoEmergency if {covidSevereBP} !IN {noList[*]}: Goto: promptSevereBP covidSevereBP = {False} @promptNose Name Reconvey: "Robbie", "{userRef3C} have a runny or stuffy nose?", "Do you of the person you are calling about have a new loss of taste or smell?" voice_input(covidNose) if {covidNose} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNose if {covidNose} IN {noList[*]}: covidNose = {False} else: if {covidNose} !IN {yesList[*]}: Goto: promptNose covidNose = {True} @promptThroat Name Reconvey: "Robbie", "{userRef3C} have a sore throat?", "Do you or the person you are calling about have a sore throat?" voice_input(covidThroat) if {covidThroat} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptThroat if {covidThroat} IN {noList[*]}: covidThroat = {False} else: if {covidThroat} !IN {yesList[*]}: Goto: promptThroat covidThroat = {True} @promptMuscle Name Speak: "Robbie", "{userRef3C} have muscle aches or pains?" voice_input(covidMuscle) if {covidMuscle} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptMuscle if {covidMuscle} IN {noList[*]}: covidMuscle = {False} else: if {covidMuscle} !IN {yesList[*]}: Goto: promptMuscle covidMuscle = {True} @promptTaste Name Reconvey: "Robbie", "{userRef3C} have a new loss of taste or smell?", "Do you or the person you are calling about have a new loss of taste or smell?" voice_input(covidTaste) if {covidTaste} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptTaste if {covidTaste} IN {noList[*]}: covidTaste = {False} else: if {covidTaste} !IN {yesList[*]}: Goto: promptTaste covidTaste = {True} @promptFatigue Name Speak: "Robbie", "{userRef3C} have unusual tiredness, fatigue or malaise?" voice_input(covidFatigue) if {covidFatigue} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptFatigue if {covidFatigue} IN {noList[*]}: covidFatigue = {False} else: if {covidFatigue} !IN {yesList[*]}: Goto: promptFatigue covidFatigue = {True} @promptNausea Name Speak: "Robbie", "{userRef3C} have nausea, vomiting, or diarrhea" voice_input(covidNausea) if {covidNausea} IN {detailsList[*]}: Name Speak: "Robbie", "It is important for record keeping to keep track of symptoms related to Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNausea if {covidNausea} IN {noList[*]}: covidNausea = {False} else: if {covidNausea} !IN {yesList[*]}: Goto: promptNausea covidNausea = {True} #HIGH RISK Name Speak: "Robbie", "I am now going to ask questions about ongoing medical conditions including pregnancy." @promptLungs Name Speak: "Robbie", "{userRef3C} have chronic lung diseases?" # Details: "like asthma, chronic obstructive pulmonary disease [chronic bronchitis or emphysema], or other chronic conditions associated with impaired lung function or that require home oxygen?" voice_input(covidLungs) if {covidLungs} IN {detailsList[*]}: Name Speak: "Robbie", "Chronic lung diseases include asthma, chronic obstructive pulmonary disease, chronic bronchitis or emphysema, or other chronic conditions associated with impaired lung function or that require home oxygen. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLungs if {covidLungs} IN {noList[*]}: covidLungs = {False} else: if {covidLungs} !IN {yesList[*]}: Goto: promptLungs covidLungs = {True} @promptHeart Name Speak: "Robbie", "{userRef3C} have congestive heart failure?" voice_input(covidHeart) if {covidHeart} IN {detailsList[*]}: Name Speak: "Robbie", "Congestive heart failure includes coronary artery blockage, heart attack, valve disease or congenital heart disease, and resulting in the heart not being able to pump efficiently and reduced blood flow. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptHeart if {covidHeart} IN {noList[*]}: covidHeart = {False} else: if {covidHeart} !IN {yesList[*]}: Goto: promptHeart covidHeart = {True} @promptDiabetes Name Speak: "Robbie", "{userRef3C} have diabetes with complications?" # Details: "like limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially if they have uncontrolled diabetes or other complications?" voice_input(covidDiabetes) if {covidDiabetes} IN {detailsList[*]}: Name Speak: "Robbie", "Complications of diabetes include limb amputation, kidney disease, vision problems, heart disease, history of stroke, or, especially uncontrolled diabetes or other complications. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptDiabetes if {covidDiabetes} IN {noList[*]}: covidDiabetes = {False} else: if {covidDiabetes} !IN {yesList[*]}: Goto: promptDiabetes covidDiabetes = {True} @promptNeuroCough Name Speak: "Robbie", "{userRef3C} have neurological conditions that weaken ability to cough?" # Details: "like disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury voice_input(covidNeuroCough) if {covidNeuroCough} IN {detailsList[*]}: Name Speak: "Robbie", "Neurological conditions that weaken ability to cough include disorders of the brain, spinal cord, peripheral nerve, and muscle such as cerebral palsy, epilepsy [seizure disorders], stroke, intellectual disability, moderate to severe developmental delay, muscular dystrophy, or spinal cord injury. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptNeuroCough if {covidNeuroCough} IN {noList[*]}: covidNeuroCough = {False} else: if {covidNeuroCough} !IN {yesList[*]}: Goto: promptNeuroCough covidNeuroCough = {True} @promptWeakImmune Name Speak: "Robbie", "{userRef3C} have a weakened immune system?" voice_input(covidWeakImmune) if {covidWeakImmune} IN {detailsList[*]}: Name Speak: "Robbie", "A weakened immune system includes seeing a doctor for cancer and treatment such as chemotherapy or radiation, receiving an organ or bone marrow transplant, taking high doses of oral steroids or other immunosuppressant medications, HIV or AIDS. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptWeakImmune if {covidWeakImmune} IN {noList[*]}: covidWeakImmune = {False} else: if {covidWeakImmune} !IN {yesList[*]}: Goto: promptImmune covidWeakImmune = {True} @promptDialysis Name Speak: "Robbie", "{userRef3C} have dialysis or under treatment for a kidney disease?" voice_input(covidDialysis) if {covidDialysis} IN {detailsList[*]}: Name Speak: "Robbie", "Dialysis includes any type of dialysis, and kidney diseases are not specified in the CDC guide recommendations. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptDialysis if {covidDialysis} IN {noList[*]}: covidDialysis = {False} else: if {covidDialysis} !IN {yesList[*]}: Goto: promptDialysis covidDialysis = {True} @promptLiver Name Speak: "Robbie", "{userRef3C} have cirrhosis of the liver, chronic hepatitis or other liver disease?" voice_input(covidLiver) if {covidLiver} IN {detailsList[*]}: Name Speak: "Robbie", "Liver disease includes cirrhosis of the liver, chronic hepatitis or other liver disease, not are not specified in the CDC Covid-19 screening guide recommendations. Additional details in progress. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptLiver if {covidLiver} IN {noList[*]}: covidLiver = {False} else: if {covidLiver} !IN {yesList[*]}: Goto: promptLiver covidLiver = {True} @promptObesity Name Speak: "Robbie", "{userRef3C} have extreme obesity?" voice_input(covidObesity) if {covidObesity} IN {detailsList[*]}: Name Speak: "Robbie", "Extreme obesity is Body Mass Index [BMI] greater than or equal to 40. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Additional details in progress. Thank you for helping test the Neon Covid-19 screener." Goto: promptObesity if {covidObesity} IN {noList[*]}: covidObesity = {False} else: if {covidObesity} !IN {yesList[*]}: Goto: promptObesity covidObesity = {True} @promptPregnancy Name Speak: "Robbie", "{userRef3C} have a current pregnancy or pregnant in the last 2 weeks?" voice_input(covidPregnancy) if {covidPregnancy} IN {detailsList[*]}: Name Speak: "Robbie", "Pregnancy and recent pregnancy are considered ongoing medical conditions in the CDC Covid-19 screening guide. People with ongoing medical conditions are more at risk of severe symptoms from Covid-19. Thank you for helping test the Neon Covid-19 screener." Goto: promptPregnancy if {covidPregnancy} IN {noList[*]}: covidPregnancy = {False} else: if {covidPregnancy} !IN {yesList[*]}: Goto: promptPregnancy covidPregnancy = {True} # CALCULATE COMORBIDITIES AND ADVERSE RISKS Python: covidComorbiditiesCount = {covidLungs} + {covidHeart} + {covidDiabetes} + {covidNeuroCough} + {covidDialysis} + {covidLiver} + {covidObesity} + {covidPregnancy) if {covidComorbiditiesCount} >0 : Name Speak: "Robbie", "Important! You've reported significant underlying medical conditions and illness symptoms you are advised to contact a care provider and be seen within 24 hours." # Add - Collect details? .. If history appears unreliable: Screen for other medical conditions. "Please tell me about any medicine that you/sick person take(s) daily or regularly." Ask about current medications that might indicate underlying chronic conditions. # CHECK IF CAREGIVER OR LIVING IN FACILITY @promptNursingHome Name Speak: "Robbie", "{userRef3C} live in a nursing home or other long-term care facility?", "Do you or the person you are calling about live in a nursing home or other long-term care facility?" voice_input(covidNursingHome) if {covidNursingHome} IN {noList[*]}: covidNursingHome = {False} else: if {covidNursingHome} !IN {yesList[*]}: Goto: promptNursingHome covidNursingHome = {True} covidCareGiver = {False} Name Speak: "Robbie", "It is important that you immediately report these symptoms to your nursing home or care facility immediately, including shortness of breath, fever or cough." Goto: G-careFacilityReport @promptCareGiver Name Reconvey: "Robbie", "{userRef3C} been involved as a worker, student or volunteer at a health care setting in the last two weeks?", "In the last two weeks have you or the person you are calling about worked or volunteered... work?" # Details: in the last two weeks worked or volunteered in a hospital, emergency room, clinic, medical office, ambulance service, first responder services, or any health care setting, or taken care of patients as a student as a part of your/their work? voice_input(covidCareGiver) if {covidCareGiver} IN {noList[*]}: covidCareGiver = {False} else: if {covidCareGiver} !IN {yesList[*]}: Goto: promptCareGiver covidCareGiver = {True} Name Speak: "Robbie", "It is important that you immediately report your symptoms to the occupational health provider for the care facility where you were involved, including shortness of breath, fever or respiratory symptoms." Goto: F-careGiverReport # List Symptoms, Comorbidities & Risks Name Speak: "Robbie", "Would you like me to list your information including Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: checkDispositions Name Speak: "Robbie", "I will list your information. Would you like me to read out loud?" voice_input(userInput) if {userInput} IN {noList[*]}: varNoSpeak = "" else varNoSpeak = "" varProsody = "rate='x-fast'" Name Speak: "Robbie", "{varNoSpeak} User Name {userName} " Name Speak: "Robbie", "{varNoSpeak} User Ref {covidUserRef} " Name Speak: "Robbie", "{varNoSpeak} User Ill {covidIll} " Name Speak: "Robbie", "{varNoSpeak} User Age {covidAge} " Name Speak: "Robbie", "{varNoSpeak} Life Threat {covidLifeThreat} " Name Speak: "Robbie", "{varNoSpeak} Contact {covidContact} " Name Speak: "Robbie", "{varNoSpeak} Fever {covidFever} " Name Speak: "Robbie", "{varNoSpeak} Breathing {covidBreath} " Name Speak: "Robbie", "{varNoSpeak} Severe Breathing {covidSevereBreath} " Name Speak: "Robbie", "{varNoSpeak} Cough {covidCough} " Name Speak: "Robbie", "{varNoSpeak} Severe Cough {covidSevereCough} " Name Speak: "Robbie", "{varNoSpeak} BP {covidBP} " Name Speak: "Robbie", "{varNoSpeak} Severe BP {covidSevereBP} " Name Speak: "Robbie", "{varNoSpeak} Nose {covidNose} " Name Speak: "Robbie", "{varNoSpeak} Throat {covidThroat} " Name Speak: "Robbie", "{varNoSpeak} Muscle {covidMuscle} " Name Speak: "Robbie", "{varNoSpeak} Taste {covidTaste} " Name Speak: "Robbie", "{varNoSpeak} Fatigue {covidFatigue} " Name Speak: "Robbie", "{varNoSpeak} Nausea {covidNausea} " Name Speak: "Robbie", "{varNoSpeak} Comorbidities " Name Speak: "Robbie", "{varNoSpeak} Lungs {covidLungs} " Name Speak: "Robbie", "{varNoSpeak} Heart {covidHeart} " Name Speak: "Robbie", "{varNoSpeak} Diabetes {covidDiabetes} " Name Speak: "Robbie", "{varNoSpeak} Neuro Cough {covidNeuroCough} " Name Speak: "Robbie", "{varNoSpeak} Weakened Immune {covidWeakImmune} " Name Speak: "Robbie", "{varNoSpeak} Dialysis {covidDialysis} " Name Speak: "Robbie", "{varNoSpeak} Liver {covidLiver} " Name Speak: "Robbie", "{varNoSpeak} Obesity {covidObesity} " Name Speak: "Robbie", "{varNoSpeak} Pregnancy {covidPregnancy} " Name Speak: "Robbie", "{varNoSpeak} Comorbidities Total {covidComorbiditiesCount} " Name Speak: "Robbie", "{varNoSpeak} Nursing Home or Facility {covidNursingHome} " Name Speak: "Robbie", "{varNoSpeak} Care Giving {covidCareGiver} " @checkDispositions Name Speak: "Robbie", "Neon AI test - Checking for Dispositions for the reported symptoms." # CALCULATE D-gotoEmergency DISPOSITION Python: covidEmergencyCount = {covidSevereBreath} + {covidSevereCough} + {covidSevereBP} if {covidEmergencyCount} >0 : Name Speak: "Robbie", "People with these severe symptoms are advised to immediately go to the Emergency Department." Goto: D-gotoEmergency # CALCULATE E-callMedicalProvider DISPOSITION # TODO: '*' is not a valid character Python: covidProvider24Count = {covidBreath} + ( {covidFever} * {covidComorbiditiesCount} ) + ( {covidCough} * {covidComorbiditiesCount} ) if {covidProvider24Count} >0 : Name Speak: "Robbie", "People with the reported symptoms are advised to call a medical provider within 24 hours, and are encouraged to participate in tele-health options from their health care provider." Goto: E-callMedicalProvider # CALCULATE BREATHING DISPOSITIONS if {covidBreath}: if {covidComorbiditiesCount} >= 1: Goto: B-call911 Goto: D-gotoEmergency # CALCULATE H-selfCare DISPOSITION Python: covidStayHomeCount = {covidFever} + {covidFever} + {covidCough} if {covidStayHomeCount} >0 : Name Speak: "Robbie", "People with the reported symptoms are advised to stay home and call their health care provider if they get worse, and are encouraged to participate in tele-health options from their health care provider." Goto: H-selfCare # TODO: Goto line here to catch no response, different response for completion vs not ill DM # NO SYMPTOMS - A @A-noSymptoms Name Speak: "Robbie", "The Neon AI triage service is intended for people who are ill or caring for someone who is ill. For general information about coronavirus disease 2019 (COVID-19), please refer to the Centers for Disease Control and Prevention (CDC) website. Do you have something to write with? The CDCs website is www.cdc.gov/COVID19." Goto: promptCreateReport #CALL 911 - B @B-call911 Name Reconvey: "Robbie", "Immediate medical attention is needed. You need to call 911 now. Tell the 911 operator if you have been in contact with someone with COVID-19 or if you have recently been to an area where COVID-19 is spreading." Goto: promptCreateReport #CHILD LESS THAN 5 YEARS OLD - C @C-lessThanFive Name Speak: "Robbie", "This triage line is intended for children who are at least five years old and adults. If your child is younger than five years old and is sick, please contact their medical provider as soon as possible. If your child has had contact with a person who is sick with COVID-19 or has been in an area with community spread of COVID-19, please let their medical providers know." Goto: promptCreateReport #GO TO EMERGENCY DEPARTMENT - D @D-gotoEmergency Name Reconvey: "Robbie", "Urgent medical attention is needed." Name Reconvey: "Robbie", "You need to go to your nearest emergency department." Name Speak: "Robbie", If you have had contact with a person who is sick with COVID-19 or you have been in an area with community spread of COVID-19, please let your medical providers know as soon as you arrive at the emergency department." Goto: promptCreateReport #CONTACT MEDICAL PROVIDER WITHIN 24 HOURS - E @E-gotoMedicalProvider Name Reconvey: "Robbie", "You have some symptoms that may be related to COVID-19. Stay home except to get medical care. Separate yourself from others in your home. Wear a facemask, if possible. Clean your hands often. Avoid sharing personal household items. Clean all high-touch surfaces everyday. Monitor your symptoms and seek prompt medical attention if your illness is worsening.", "You have some symptoms that may be related to COVID-19... Monitor your symptoms and seek prompt medical attention if your illness is worsening." Goto: promptCreateReport #CONTACT OCCUPATIONAL HEALTH PROVIDER AT WORK - F @F-careGiverReport Name Speak: "Robbie", "Contact an occupational health provider in your healthcare facility as soon as possible. If you have cared for a person who is sick with COVID-19 or have been in an area with community spread of COVID-19, please let your occupational health provider know as soon as you speak with them." Goto: promptCreateReport #CONTACT HEALTHCARE PROVIDER IN LONG TERM CARE FACILITY - G @G-careFacilityReport Name Speak: "Robbie", "You may be at higher risk for severe illness since you live in a nursing home or a long-term care facility. Tell a caregiver at the facility that you are sick and need to see a medical provider as soon as possible." Goto: promptCreateReport #STAY HOME AND TAKE CARE OF YOURSELF. CONTACT PROVIDER IF THINGS GET WORSE - H @H-selfCare Name Speak: "Robbie", "Sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # Not Done Yet - Z @Z-inProgress Name Speak: "Robbie", "I'm sorry {userName} I'm not programmed for that answer yet. I'm sorry you are feeling ill. You have one or more symptom(s) that may be related to COVID-19. Stay home and take care of yourself. Please follow steps to prevent others in your household or community from getting sick." Goto: promptCreateReport # CREATE REPORT @promptCreateReport Name Speak: "Robbie", "Would you like me to send you an email with the information you have reported today, including User info, Symptoms and Comorbidities?" voice_input(userInput) if {userInput} IN {noList[*]}: Goto: screeningComplete Variable: screeningReport screeningReport = "User Name {userName} " screeningReport = "{screeningReport}, User Ref {covidUserRef} " screeningReport = "{screeningReport}, Ill {covidIll} " screeningReport = "{screeningReport}, Age {covidAge} " screeningReport = "{screeningReport}, Life Threat {covidLifeThreat} " screeningReport = "{screeningReport}, Contact {covidContact} " screeningReport = "{screeningReport} \nSymptoms \n" screeningReport = "{screeningReport}Fever {covidFever} " screeningReport = "{screeningReport}, Breathing {covidBreath} " screeningReport = "{screeningReport}, Severe Breathing {covidSevereBreath} " screeningReport = "{screeningReport}, Cough {covidCough} " screeningReport = "{screeningReport}, Severe Cough {covidSevereCough} " screeningReport = "{screeningReport}, BP {covidBP} " screeningReport = "{screeningReport}, Severe BP {covidSevereBP} " screeningReport = "{screeningReport}, Nose {covidNose} " screeningReport = "{screeningReport}, Throat {covidThroat} " screeningReport = "{screeningReport}, Muscle {covidMuscle} " screeningReport = "{screeningReport}, Taste {covidTaste} " screeningReport = "{screeningReport}, Fatigue {covidFatigue} " screeningReport = "{screeningReport}, Nausea {covidNausea} " screeningReport = "{screeningReport} \nComorbidities \n" screeningReport = "{screeningReport}Lungs {covidLungs} " screeningReport = "{screeningReport}, Heart {covidHeart} " screeningReport = "{screeningReport}, Diabetes {covidDiabetes} " screeningReport = "{screeningReport}, Neuro Cough {covidNeuroCough} " screeningReport = "{screeningReport}, Weakened Immune {covidWeakImmune} " screeningReport = "{screeningReport}, Dialysis {covidDialysis} " screeningReport = "{screeningReport}, Liver {covidLiver} " screeningReport = "{screeningReport}, Obesity {covidObesity} " screeningReport = "{screeningReport}, Pregnancy {covidPregnancy} " screeningReport = "{screeningReport} \nComorbidities Total {covidComorbiditiesCount} \n" screeningReport = "{screeningReport}Nursing Home or Facility {covidNursingHome} " screeningReport = "{screeningReport}, Care Giving {covidCareGiver} " Name Speak: "Robbie", "This is your Screening Report {screeningReport}" Name Speak: "Robbie", "Report ready to email. Say cancel to not send the email, or say send to send." voice_input(userInput) if {userInput} == "cancel": Goto: screeningComplete Email: "Neon COVID Screening Report", screeningReport @screeningComplete Name Speak: "Robbie", "Would you like to restart the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList}: Name Speak: "Robbie", "Would you like to erase all your answers before restarting the demonstration Covid-19 screening application test?" voice_input(userInput) if {userInput} IN {yesList[*]}: Name Speak: "Robbie", "Erasing current test answers and restarting." Goto: restartCovidScreening Name Speak: "Robbie", "Restarting screening test with current test answers." Goto: startCovidScreening Name Speak: "Robbie", "Thank you {userName} for testing the Neon AI Conversational Covid 19 Screening Script. "Robbie", signing off." Name Speak: "Robbie", "Would you like to test the Neon AI Patient Assistant Script?" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Reconvey: "Robbie", "Transferring to Pat, our Patient Assistant demonstration. Goodbye {userName}.", "Goodbye" Execute : "Run the patient assistant script" # Name Speak : Robbie :"Neon run the Patient Assistant script starting at SCRIPTENTRY" exit # Name Speak: "Robbie", "Lastly, would you like to test the Neon AI Conversational Script Menu?" # voice_input(askReturnValue) # if {askReturnValue} IN {yesList[*]}: # Name Speak: "Robbie", "Transferring to Otto, our Conversational Script Menu Assistant demonstration. Goodbye {userName}." # Name Speak: "Robbie", "Neon run the script menu script starting at SCRIPTENTRY" # exit Name Speak: "Robbie", "Thank you {userName} for helping me practice my conversational skills and letting me practice help you." exit

Script: "Demo Guess Number Timeout" Author: Daniel McKnight Timeout: 15 Description: Neon will select a number between 1 and 10 at random and give hints until the user guesses correctly. If there is no response for 15 seconds, the script will exit Variable: numbers = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Variable: neon_num = random(numbers) Variable: user_guess = "" Set: neon_num = random(numbers) Neon speak: # "My number is {neon_num}" "I'm thinking of a number between 1 and 10" "Guess what it is or say 'exit'" LOOP guess voice_input{user_guess} if {user_guess} in {numbers}: if {user_guess} == {neon_num}: Neon speak: "You guessed it!" Exit if {user_guess} > {neon_num}: Neon speak: "Lower" LOOP guess END if {user_guess} < {neon_num}: Neon speak: "Higher" LOOP guess END else if {user_guess} != "exit": Neon speak: "That's not a valid guess, try again." LOOP guess END Exit

Script: Demo Profile Reconveyance Variable: body = "Test email body\nnewline" Variable: emailAddr = profile(user.email) Variable: spoken if {emailAddr}: Neon speak: "your email address is {emailAddr}" else: Neon speak: I don't know what your email address is Neon speak: Say something and I'll say it back to you voice_input(spoken) Neon Speak: You said: Reconvey: spoken Exit

Script: "Demo Weather Loop" Variable: location Variable: forecast LOOP WW Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" "Say exit to exit" voice_input(location) Case {location}: "A or Athens" Execute: "What is the weather in Athens" Neon speak: "about to repeat A" "B or Bombay" Execute: "What is the weather in Bombay" Neon speak: "say 10 day or 5 day forecast" voice_input(forecast) Case {forecast}: "10 day or 10" Execute: "What is the 10 day forecast for Bombay" "5 day or 5" Execute: "What is the 5 day forecast for Bombay" Neon speak: "about to repeat B" "S or Seattle" Execute: "What is the weather in Seattle" Neon speak: "about to repeat S" Neon speak: "End of loop WW." LOOP WW END Neon speak: "I'm done now." Exit

Script: "Eddie" Variable: name Variable: more Language: en-gb, male Name Speak: Eddie, "Welcome to the Neongecko Intro, My name is Eddie." Name Speak: Eddie, "What is your name?" voice_input(name) Name Speak: Eddie, "hi {name}" Name Speak: Eddie, " I am good at searching for your favorite music and videos" Name Speak: Eddie, "You can ask me to play songs, albums, artists, shows, movies, and more." Name Speak: Eddie, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits." EXIT

Script: Eliza 1965 Language: "en-GB female" Variable: input = "" Variable: split_input Synonym: Run Eliza Synonym: Talk to Eliza Synonym: Let's talk Synonym: I'm feeling lonely Synonym: I'd like to talk with Synonym: Talk to Neon AI # Static Strings Variable: initial = It's nice to meet you. How are you today? Variable: final = Goodbye. Thank you for talking to me. Variable: quit = bye, goodbye, quit # Substitutions Variable: input_sub = dont don't, cant can't, wont won't, recollect remember, dreamt dreamed, dreams dream, maybe perhaps, when what, certainly yes, machine computer, computers computer, were was, "you're" "you are", "i'm" "i am", same alike # Synonyms Variable: belief = belief, feel, think, believe, wish Variable: family = family, mother, mom, father, dad, sister, brother, wife, children, child Variable: desire = desire, want, need, wish Variable: sad = sad, unhappy, depressed, sick Variable: happy = happy, elated, glad, better Variable: cannot = cannot, can't Variable: everyone = everyone, everybody, nobody, noone Variable: people = people, they, others, adults, children, teenagers Variable: be = be, am, is, are, was Variable: sorry = sorry, i apologize Variable: language = deutsch, francais, italiano, espanol # Input to response matching Variable: key_sub = "* [sorry] for {sorry_1}" "Please don't apologize about {sorry_1}" "No need to apologize about {sorry_1[*]}" "I've told you that apologies are not required.", "i remember {2}" "Do you often think of {2}?" "Does thinking of {2} bring anything else to mind?" "What else do you recollect?" "Why do you recollect {2} just now?" "What in the present situation reminds you of {2}?", "do you remember {2}" "Did you think I would forget {2}?" "Why do you think I should recall {2} now?" "What about {2}? "You mentioned {2}?", "if *" "Do you think its likely that *?" "Do you wish that *?" "What do you know about *?" "Really, if *?", "* dreamed {1}" "Really, {1}?" "Have you ever fantasized {1} while you were awake?" "Have you ever dreamed {1} before?", "dream" "What does that dream suggest to you?" "Do you dream often?" "What persons appear in your dreams? "Do you believe that dreams have something to do with your problems?", "perhaps" "You don't seem quite certain." "Why the uncertain tone?" "Can't you be more positive?" "You aren't sure?" "Don't you know?", "name" "I am not interested in names." "I've told you before, I don't care about names -- please continue.", "*[language]*" "I speak only English" "I do not speak {[language]}", "hello" "How do you do. Please state your problem." "Hi. What seems to be your problem?", "how are you" "We were discussing you -- not me.", "are you *" "Why are you interested in whether I am * or not?" "Would you prefer if I weren't *?" "Perhaps I am * in your fantasies." "Do you sometimes think I am *?", "computer" "Do computers worry you?" "Why do you mention computers?" "What do you think machines have to do with your problem?" "Don't you think computers can help people?" "What about machines worries you?" "What do you think about machines?", "am i *" "Do you believe you are *?" "Would you want to be *?" "Do you wish I would tell you you are *?" "What would it mean if you were *?", "[people] are *" "Did you think they might not be *?" "Would you like it if they were not *?" "What if they were not *?" "Possibly they are *.", "was i *" "What if you were *?" "Do you think you were *?" "Were you *?" "What would it mean if you were *?" "What does * suggest to you ?", "i was *" "Were you really?" "Why do you tell me you were * now?" "Perhaps I already know you were *.", "was you *" "Would you like to believe I was *?" "What suggests that I was *?" "What do you think?" "Perhaps I was *." "What if I had been *?", "i am * [sad]" "I am sorry to hear that you are {[sad]}." "Do you think that coming here will help you not to be {[sad]}?" "I'm sure it's not pleasant to be {[sad]}." "Can you explain what made you {[sad]}?", "i am * [happy]" "How have I helped you to be {[happy]}?" "Has your treatment made you {[happy]}?" "What makes you {[happy]} just now?" "Can you explain why you are suddenly {[happy]}?", "i [belief] {1} i {2}" "Do you really think so?" "But you are not sure you {2}." "Do you really doubt you {2}?", "i am *" "Is it because you are * that you came to me?" "How long have you been *?" "Do you believe it is normal to be *?" "Do you enjoy being *?", "i [cannot] *" "Why do you think that you can't *?" "Have you tried?" "Perhaps you could * now." "Do you really want to be able to *?", "i don't *" "Don't you really *?" "Why don't you *?" "Do you wish to be able to *?" "Does that trouble you?", "do i feel *" "Tell me more about such feelings." "Do you often feel *?" "Do you enjoy feeling *?" "Of what does feeling * remind you?", "i * you" "Perhaps in your fantasies we * each other." "Do you wish to * me?" "You seem to need to * me." "Do you * anyone else?", "you are *" "What makes you think I am *?" "Does it please you to believe I am *?" "Do you sometimes wish you were *?" "Perhaps you would like to be *.", "you * me" "Why do you think I * you?" "You like to think I * you, don't you ?" "What makes you think I * you?" "Really, I * you?" "Do you wish to believe I * you?" "Suppose I did * you -- what would that mean?" "Does someone else believe I * you?", "yes" "You seem to be quite positive." "You are sure." "I see." "I understand.", "no" "Are you saying no just to be negative?" "You are being a bit negative." "Why not?" "Why 'no'?", "my {1} [family] {2}" "Tell me more about your {[family]}." "Who else in your family {2}?" "Your {[family]}?" "What else comes to mind when you think of your {[family]}?", "i [desire] *" "What would it mean to you if you got *?" "Why do you want *?" "Suppose you got * soon?" "What if you never got *?" "What would getting * mean to you?" "What does wanting * have to do with this discussion?", "what" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "because" "Is that the real reason?" "Don't any other reasons come to mind?" "Does that reason seem to explain anything else?" "What other reasons might there be?", "why don't you *" "Do you believe I don't *?" "Perhaps I will * in good time." "Should you * yourself?" "You want me to *?", "why can't i *" "Do you think you should be able to *?" "Do you want to be able to *?" "Do you believe this will help you to *?" "Have you any idea why you can't *?", "why" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "[everyone] {1}" "Really, {[everyone]}?" "Surely not {[everyone]} {1}." "Can you think of anyone in particular ?" "Who, for example?" "Are you thinking of a very special person?" "Who, may I ask?" "Someone special perhaps?" "You have a particular person in mind, don't you?" "Who do you think you're talking about?", "always" "Can you think of a specific example?" "When?" "What incident are you thinking of?" "Really, always?", "alike" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "[be] like" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "can you *" "You believe I can * don't you?" "You want me to be able to *." "Perhaps you would like to be able to * yourself.", "can i *" "Whether or not you can * depends on you more than me." "Do you want to be able to *?" "Perhaps you don't want to *.", "your *" "Why are you concerned over my *?" "What about your own *?" "Are you worried about someone else's *?" "Really, my *?", "my *" "Your *?" "Why do you say your *?" "Does that suggest anything else which belongs to you?" "Is it important that your *?", "you *" "We are discussing you -- not me." "Oh. I *?" "You're not really talking about me -- are you?" "What are your feelings now?", "i *" "You say *?" "Can you elaborate on that?" "Do you say * for some special reason?" "That's quite interesting.", "thank you" "you are welcome" "don't mention it" "no problem", "[quit]" "{final}", "*" "I'm not sure I understand you fully." "Please go on." " What do you mean by *?" "Do you feel strongly about discussing such things?" Name speak: Eliza: {initial} LOOP pre voice_input {input} Set: user_speech = {input} sub_values{input, input_sub} sub_key{input, key_sub} Name speak: Eliza: {input} if {user_speech} in {quit}: Exit LOOP pre END Neon speak: {final} Exit

Script: "Good Morning" Neon speak: "Good Morning" "The time is" Execute: "What time is it" Neon speak: "The weather is" Execute: "what is the weather" Neon speak: "Thank you for starting me up. I look forward to talking with you" Exit

Script: "Grocery Greeter" Variable: init Variable: name Variable: more # Variable: {}: "" Neon Speak: "Starting the Grocery Greeter. Waiting for activation" voice_input(init) Neon Speak: "Welcome to the Neon Gecko Grocery Store." # Neon Speak: "Welcome to the Neon Gecko Grocery Store Greeter. My name is Neon." # Neon Speak: "What is your name?" # voice_input{name} # Neon Speak: "hi {name}" Neon Speak: "What can I help you find?" LOOP Q1 Neon Speak: "For example say produce for fresh vegetables, nuts, and fruit, or more for more options" voice_input(more) Neon Speak: {more} IF "more" IN {more}: Neon Speak: "more IN {more}" Goto: say_options IF "done" == {more}: Neon Speak: "done == {more}" Goto: say_goodbye IF "more" == {more}: Neon Speak: "more == {more}" Goto: say_options IF "Meat" IN {more}: Neon Speak: "Meat can be found in Aisle 7, towards the back of the store" IF "Dairy" IN {more}: Neon Speak: "Dairy can be found in Aisle 1, towards the front of the store" IF "Produce" IN {more}: Neon Speak: "Produce can be found in Aisle 3, near the bakery" IF "Frozen" IN {more}: Neon Speak: "Frozen Foods can be found in Aisle 5, in the middle of the store" IF "Bakery" IN {more}: Neon Speak: "The bakery can be found in Aisle 2, towards the front of the store" IF "Deli" IN {more}: Neon Speak: "Deli items can be found in Aisle 8, towards the back of the store, near the Meat Department" IF "Medicine" IN {more}: Neon Speak: "Medicine can be found in Aisle 4, towards the middle of the store" @say_options Neon Speak: "Still need assistance? Say meat, or dairy, or cleaning" # Neon Speak: "You can also say specific items, like apples, or steak" # Neon Speak: "You can say produce, frozen, bakery, deli, or more" # Neon Speak: "Say done to exit at any time" LOOP Q1 END @say_goodbye Neon Speak: "Goodbye" Exit

Script: "Guess My Word" Language: en-us, female # Demonstration word game player from Neon AI # "Hi {userName}. Let's play the game guess my 7 word popular phrase. It very simple. I will choose a 7 word phrase and tell you one word. Then you guess a word, and if it is in the seven work phrase I will tell you its position or to guess again. Anytime you want you can guess the phrase, just say I guess and I will tell you if you're right. If you want me to tell you what you've already guessed, just say recap or history. Say hint and I will tell you another word." # Later n word phrases; n letter words; subject specific popular phrase input from Wolfram, google; foreign language # Set up wait time for participant responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT @AnnounceVersion Name Speak: Gamon,"Neon Word Game Demonstration Version 2020 08 06 22:30 Testing" # Announce version ("Testing" is displayed as text and is not spoken) Variable: sevenWordPhraseArray = "A DATE THAT WILL LIVE IN INFAMY", "A DAY THAT WILL LIVE IN INFAMY", "A WORD TO THE WISE IS ENOUGH", "A WORD TO THE WISE IS SUFFICIENT", "AND A MERRY OLD SOUL WAS HE", "CAN'T SEE THE FOREST FOR THE TREES", "CHILL OUT AND PLAY SOME VIDEO GAMES", "COME OUT COME OUT WHEREVER YOU ARE", "I SMELL THE BLOOD OF AN ENGLISHMAN", "I'M LATE FOR A VERY IMPORTANT DATE", "IF IT AIN'T BROKE DON'T FIX IT", "IF YOU BUILD IT HE WILL COME", "IF YOU BUILD IT THEY WILL COME", "IT WAS A DARK AND STORMY NIGHT", "IT'S ALL HUMBUG I TELL YOU HUMBUG", "JACK AND JILL WENT UP THE HILL", "JACK FELL DOWN AND BROKE HIS CROWN", "LAUGH AND THE WORLD LAUGHS WITH YOU", "LEAP TALL BUILDINGS IN A SINGLE BOUND", "LIFE LIBERTY AND THE PURSUIT OF HAPPINESS", "LIONS AND TIGERS AND BEARS OH MY", "LITTLE BO PEEP HAS LOST HER SHEEP", "LITTLE PIGS LITTLE PIGS LET ME IN", "LIVE FROM NEW YORK IT'S SATURDAY NIGHT", "NEITHER A BORROWER NOR A LENDER BE", "NOT BY THE HAIR ON MY CHINNY-CHIN-CHIN", "NOT BY THE HAIR OF MY CHINNY-CHIN-CHIN", "NOW I LAY ME DOWN TO SLEEP", "OH WHAT A TANGLED WEB WE WEAVE", "ONE THING I CAN SAY FOR SURE", "OLD MOTHER HUBBARD WENT TO THE CUPBOARD", "OVER THE RIVER AND THROUGH THE WOODS", "THE BEST-LAID SCHEMES OF MICE AND MEN", "THE BEST-LAID PLANS OF MICE AND MEN", "DISCRETION IS THE BETTER PART OF VALOR", "THE BETTER PART OF VALOR IS DISCRETION", "THE FACE THAT LAUNCHED A THOUSAND SHIPS", "THE HABITS OF HIGHLY EFFECTIVE PEOPLE", "THE STUFF THAT DREAMS ARE MADE FROM", "THE STUFF THAT DREAMS ARE MADE OF", "THE STUFF OF WHICH DREAMS ARE MADE", "THE STUFF FROM WHICH DREAMS ARE MADE", "THINGS THAT GO BUMP IN THE NIGHT", "THIS IS THE SONG THAT NEVER ENDS "TO ERR IS HUMAN TO FORGIVE DIVINE", "TO FETCH HER POOR DOG A BONE", "WE HOLD THESE TRUTHS TO BE SELF-EVIDENT", "WE THE PEOPLE OF THE UNITED STATES", "WHEN IN THE COURSE OF HUMAN EVENTS" Variable: usedPhrases Variable: chosenPhrase Variable: hintCount Variable: sayNext Variable: foundWords Variable: chosenPhraseWords Variable: chosenPhraseWordsByLen Variable: iWord Variable: blankCount Variable: userInput Variable: userInputWords Variable: userInputWordsLen usedPhrases[*] = "" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "what time is it", "Remind me to", "Play", "Record this", "Send an email", "Send a text" heyList = "hey Gamon", "Gamon are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British", "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Gamon,"Hi, I'm Gamon. I'm a demonstration word game player from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." GOTO : ASK @InstallAssistant userName = {askReturnValue} Name Speak: Gamon,"Hi {userName}. I am glad you chose to play word games with me." ## Offer additional information @ReAskMoreInfo Name Speak: Gamon,"Before starting the Neon Word Game, would you like more information on the Neon conversational AI?" timeoutReturnLabel = ReAskMoreInfo voice_input(moreAppInfo) if {moreAppInfo} IN {noList[*]}: GOTO : PromptCustomize Name Speak: Gamon,"Hi {userName}. I'm Gamon the word games playing assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) customLanguage = "" enableNeonApps = {True} Name Speak: Gamon,"Would you like to customize the Neon Word Game settings to change my voice?" # Later: Provide example of new Language/Prosody and offer reset timeoutReturnLabel = PromptCustomize voice_input(customizeSettings) if {customizeSettings} !IN {yesList[*]}: GOTO : BeginAssistant Name Speak: Gamon,"Hi {userName}. You can customize my voice for the Neon demonstration conversational game player. You can say female, male, normal, fast, slow, American, British or Australian, or say no change. " @ReAskCustomize # Name Speak: Gamon,"Would you like to change the voice of the Neon conversational Word Game Assistant?" timeoutReturnLabel = ReAskCustomize voice_input(customizeSettings) if {customizeSettings} == "": GOTO : PromptCustomize if {customizeSettings} CONTAINS "no change": GOTO : BeginAssistant if {customizeSettings} IN {noList[*]}: GOTO : BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" @ReAskApps Name Speak: Gamon,"Would you like to enable more Neon applications including playing music, playing other games, taking notes, setting reminders, making calculation, requesting general information or changing my voice?" timeoutReturnLabel = ReAskApps voice_input(customizeSettings) if {customizeSettings} == "": GOTO : ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} GOTO : BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Gamon," Your demonstration word game assistant has signed in. If you want to know if I am listening, you can say, hey Gamon , or, Gamon are you there. " Name Speak: Gamon,"Hi {userName}. Let's play the game guess my 7 word popular phrase. It very simple. I will choose a 7 word phrase and tell you one word. Then you guess a word, and if it is in the seven work phrase I will tell you its position or to guess again. Anytime you want you can guess the phrase, just say I guess and I will tell you if you're right. If you want me to tell you what you've already guessed, just say recap or history. Say hint and I will tell you another word." ### SET UP GAME # Choose New Phrase @ChooseNewPhrase chosenPhrase = random(sevenWordPhraseArray) # Check if used before if usedPhrases CONTAINS chosenPhrase GOTO : ChooseNewPhrase # Add New Phrase to list of phrased used usedPhrases = chosenPhrase hintCount = 0 sayNext = "" foundWords[*] = "" # Build word row for the sevenWordPhrase Python: chosenPhraseWords = chosenPhrase.split() # Build word row by word length [0]..[6] Python: chosenPhraseWordsByLen = chosenPhraseWords.sort(key=len) @NextHint # Give first or next hint if foundWords CONTAINS chosenPhraseWordsByLen[hintCount] : Python: hintCount++ GOTO : NextHint Name Speak: Gamon,"Hint {hintCount}, the {sayNext} longest word is" {chosenPhraseWordsByLen[hintCount]} foundWords = {chosenPhraseWordsByLen[hintCount]} Python: hintCount++ sayNext = "next" @GuessNextWord Name Speak: Gamon,"Here's where we're at" iWord = 0 blankCount = 0 LOOP SayFoundWords if chosenPhraseWord[iWord] in foundWords : Name Speak: Gamon,chosenPraseWord[i] else Name Speak: Gamon,"blank" Python: blankCount++ Python: iWord++ LOOP SayFoundWords UNTIL iWord >= 7 if blankCount == 0 Name Speak: Gamon,"Game Over! Thank you {userName} for playing with me" Name Speak: Gamon,"Let's play again" GOTO : ChooseNewPhrase ### Wait for Gamon/Emergency/Neon activiation alert phrase @WaitForAlertPhrase askPrompt = "Say I guess followed by a word, or I guess followed a phrase, or hint or recap or guessed words or exit" timeoutReturnLabel = WaitForAlertPhrase returnLabel = GotUserPhrase Goto : ASK @GotUserPhrase userInput = askReturnValue if {userInput} == "" : GOTO : ReAskGuess if {userInput} STARTSWITH "hint" : GOTO : NextHint if {userInput} IN "guessed words", "recap", "history" : Name Speak: Gamon, "Here are your mis guessed words: {guessedWords}" GOTO : GuessNextWord if {userInput} STARTSWITH "I guess" : Python: userInputWords = userInput.split() Python: userInputWordsLen = len(userInputWords) Python: userInputWords = userInput.split() if userInputWordsLen == 3 : guessedWord = userInputWords[2] if chosenPhraseWords[*] CONTAINS guessedWord : if guessedWord !IN foundWords[*] : foundWords = guessedWord else if guessedWord !IN misGuessedWords[*] : misGuessedWords = guessedWord GOTO : GuessNextWord if userInputWordsLen != 9 : # wrong number of words Name Speak: Gamon,"I'm sorry {userName} I heard the wrong number of words." Name Speak: Gamon,"I heard {userInputWords}" Name Speak: Gamon,"Please try again." GOTO : GuessNextWord if userInputWords[2:] != chosenPhrase Name Speak: Gamon,"I heard {userInputWords}" Name Speak: Gamon,"I'm sorry {userName} that's not the popular phrase I'm thinking of." Name Speak: Gamon,"Please try again." GOTO : GuessNextWord Name Speak: Gamon, "Yay {userName} userInputWords[2:] is correct." Name Speak: Gamon,"Game Over! Thank you {userName} for playing with me" Name Speak: Gamon,"Let's play again" GOTO : ChooseNewPhrase ### SYSTEM ALERT PHRASES ## Did user ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: if {askReturnValue} STARTSWITH {inProgressList[*]}: Case: # inProgressList = "what time is it", "Remind me to", "Play", "Record this", "Send an email", "Send a text" Name Speak: Gamon,"I'm sorry {userName} that is under construction." ## Not a Gamon/Alert/Neon activation phrase, listen again GOTO : WaitForAlertPhrase # Possible EMERGENCY Name Speak: Gamon,"The Emergency Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak: Gamon,"PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp GOTO : ASK @ConfirmHelp ## Did user REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Gamon,"The Emergency Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak: Gamon,"PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : GOTO : Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak: Gamon,"{userName}! I need to hear from you! Is this an emergency?" GOTO : PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind", "not an emergency": Name Speak: Gamon,"The Emergency Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak: Gamon,"Did reconvey of jk" ## User said jk so restart listening Name Speak: Gamon,"Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 GOTO : WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Gamon,"{userName}! Needs! Help! This is an EMERGENCY" Name Speak: Gamon,"The Emergency Assistant would now send an emergency alert, sound an alarm, keep engaged with the user, and send updated alerts to the caregiver." Name Speak: Gamon,"Gamon test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak: Gamon," Gamon is restarting. Thanks again." GOTO : StartUp Name Speak: Gamon,"Gamon exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Gamon to perform an action, then the request is effected and Gamon continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Gamon,"Ask 1 Starting" if {askPrompt}: Name Speak: Gamon," {askPrompt} " ### Name Speak: Gamon,"Ask 2 Starting ask subroutine" voice_input(askReturnValue) ### Name Speak: Gamon,"Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Gamon,"Say yes to confirm exiting Gamon, the Neon Word Game Assistant" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Gamon,"Gamon , the Neon Word Game Assistant, signing off" exit else GOTO : ASK ### Name Speak: Gamon,"Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyList[*]}: Name Speak: Gamon," {userName}, Gamon the Word Game Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or if you say emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Gamon,"The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Gamon,"The false alarm count is {falseAlarmCount}!" GOTO : ASK ### Name Speak: Gamon,"Ask 5 About to return to {returnLabel}" GOTO: {returnLabel} @TIMEOUT GOTO: {timeoutReturnLabel}

Script: "Hello World Input" Variable: input Neon speak: "Hello World. Say anything or exit" voice_input(input) Neon speak: "you said {input}" Exit

Script: "Jody" Language: en-au, female Variable: name Variable: more Name Speak: Jody, "Welcome to the Neongecko Intro, My name is Jody." Name Speak: Jody, "What is your name?" voice_input(name) Name Speak: Jody, "hi {name}" Name Speak: Jody, " I am knowledgeable about the weather. You can ask me questions like what is the weather in Seattle - or any world location" Name Speak: Jody, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers, otherwise you can type your questions in the box, after this start up exits." Exit

Script: Language test Language: en-us, male Neon speak: "I am an American Male" Language: female, en-au Neon speak: "Now I am Australian Female" Language: en-gb Neon speak: Now I am British in your preferred gender Exit

Script: "Manuel" Language: es-MX, male Variable: name Variable: more Name Speak: Manuel, "Welcome to the Neongecko Intro, My name is Manuel." Name Speak: Manuel, "What is your name?" voice_input(name) Name Speak: Manuel, "hi {name}" Name Speak: Manuel, " I am good at Spanish. You can say things like translate strawberry to Spanish, or speak to me in Spanish" Name Speak: Manuel, "If your microphone and speakers are enabled you can ask me questions out loud, and hear my answers. Otherwise you can type your questions in the box, after this start up exits." EXIT

Script: "Mycroft Navigator" # Language: en-us, female Variable: options = table_scrape(https://mycroft.ai) Variable: chosen Variable: termination_bool = done Neon speak: "Please tell me what Mycroft web page you'd like to see. You can say things like {random(options)}" LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "What Mycroft web page would you like to see next?" LOOP WN END Exit

Script: "Neon AI Android Startup" Language: en-us, female Variable: startup_skill Neon speak: "Welcome to Neon AI Scripts. Please choose a script to run when you open the app." Execute: "tell me my scripts" Neon speak: "Which one would you like?" voice_input(startup_skill) Execute: "set my startup script to {startup_skill}" Exit

Script: "Neon AI Navigator" Variable: options = table_scrape(https://neon.ai) Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like {random(options)} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Script: "xyz" Neon speak "Hello" Neon speak: "Thank you for running the xyz script. Would you like to hear a joke" Execute: "tell me a joke" Neon speak: "Here is the current time" Execute: "what is the time" Exit

Script: "Neongecko Intro" Variable: name Variable: more Neon Speak: "Welcome to the Neongecko Intro, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "hi {name}" Neon Speak: "Welcome to Neongecko.com." Neon Speak: "Exiting the Neon Welcome Script. If your microphone and speakers are enabled you can ask me for time, weather, play music, show videos, caffeine contents, etcetera" EXIT

Script: Neongecko Website Demo Variable: name Variable: more Neon Speak: "Welcome to the Neongecko Intro, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "hi {name}" Neon Speak: "Welcome to Neon gecko.com. My name is Neon, I would love to show you more about our company and our products." LOOP Q1 Neon Speak: "I'll take you to the right webpage. What interests you?" Neon Speak: "For example say Android for the new Neon AI Android Communicator webpage, or more for more options" voice_input(more) Neon Speak: {more} IF "more" IN {more}: Neon Speak: "more IN {more}" Goto: say_options IF "done" == {more}: Neon Speak: "done == {more}" Goto: say_goodbye IF "more" == {more}: Neon Speak: "more == {more}" Goto: say_options IF "Android" IN {more}: Neon Speak: "Android in more" Execute: "browse to https://neongecko.com/NeonAIforAndroidPhones" IF "Nano" IN {more}: Execute: "browse to https://neongecko.com/NeonNanoforWebsiteDesigners" IF "home" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforHome" IF "Education" IN {more}: Execute: "browse to "https://neongecko.com/NeonAIforEducation" IF "Work" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforCorporations" IF "Chat" IN {more}: Execute: "browse to https://neongecko.com/NeonAIforAdvancedSocialMedia" IF "Developers" IN {more}: Execute: "browse to https://neongecko.com/NeonSDKDevelopers" @say_options Neon Speak: "Say Nano or Education or Work or Chat or Developers" # Neon Speak: "Nano for Neon AI Nano or AI Home for Neon AI Pcs designed for Home and Hobbyists, or more" # Neon Speak: "AI Education for information regarding Neon AI and our commitment to Education, or more" # Neon Speak: "AI Work for Neon AI Business and Corporate offerings, or more" # Neon Speak: "AI Chat for Advanced Social Media, our Neon AI enhanced chat, or more" # Neon Speak: "Developers for Neon AI Programmers, join our developer community and help create the future, or more" LOOP Q1 END @say_goodbye Neon Speak: "Goodbye" Exit

Script: "Pat Test Andrii" Language: "en-us male" # Help I can't get up .. # Next: Execute - Remind me to take my medicine, Log patient stats and symptoms, Play Chopin, Play game, .. # Secondary non-emergency options .. "I need a nurse" .. "I'm hungry" .. "I'm hungary" # Next: Option to exit and test the Covid-19 screening script # Email the patient assistant information and/or Pat script ## Play back to the patient what they said ("You said .." is that correct?) ## Send alert #1-PatientAssistanceRequest to nursing/caregiving administration with stt, recording and photo ## Tell patient their caregiver has been alerted, provide cancel option ## LATER: Enable interactive administrator to respond with automated and/or custom reply, with stt .. and deactivate # Ask for details ## Do you have a life threatening emergency? ## If yes then sound alarm and send alert #2-Emergency ## Do you have bleeding .. problems breathing .. weakness .. fever .. coughing .. pulse slow or racing .. ## Send alert #3 # Later: sub-script execution and return (signal?) ## LATER: Keep talking, recoding, sending alerts ## I hope you can talk to me. What's your name? Tell me a few word about your situation ## LATER: Enable administrator to take snapshots, turn on audio, video, ## LATER: Light up Patient Assistant Device, and turn on patient room door sign ### Later: Add flexible calls for help .. eg. contains emergency or help twice, I feel xyz, I'm going to xyz # Later: # Check if camera available and take a photo if available # Execute: Neon take a photo # Later: # photoTime = CURRENT_TIME() # email alert with photo to care administrator # Later: # Begin recording audio in an emergency # Sending alerts with recordings to caregiver administrator on a schedule (eg every 2 minutes) ## SOON .. (Next - Make Timeout wait time and time out label optional parameters for the user_input function) # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak: Pat, "Neon Patient Assistant Application Demonstration Version 2020 07 09 18:22 Testing" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue = "" Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps Variable: emailScriptList Variable: alarmScriptList Variable: conversationTranscript = "Our conversation went like this \n" Variable: userSymptoms Variable: gatherSymptomsList @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} emailScriptList = "send script", "email script", "send my the script", "email me the script" alarmScriptList = "alarm", "alarms", "remind", "reminder", "reminders", "timer", "timers", "time is left", "quiet", "go to sleep", "wake up", "snooze", "stop" gatherSymptomsList = "headache", "pain", "feel bad", "not feel good", "don't feel good", "I think I got" # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Pat, "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak: Pat, "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak: Pat, "Before starting the Patient Assistant would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input{moreAppInfo} if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak: Pat, "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant. I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) customLanguage = "" enableNeonApps = {True} Name Speak: Pat, "Would you like to customize the Patient Assistant settings to disable non-emergency Neon AI patient applications, or to change my voice?" # Name Speak: Pat, "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input{customizeSettings} if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak: Pat, "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak: Pat, "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input{customizeSettings} if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @ReAskApps Name Speak: Pat, "Would you like to enable more Neon patient assistance applications including playing music, playing games, reminders for medicine, hydration, meals and sleep, requests to record symptoms or other stats, and to request general information or assistance with math?" timeoutReturnLabel = ReAskApps voice_input{customizeSettings} if {customizeSettings} == "": Goto: ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} Goto: BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Pat, " Your demonstration patient assistant has signed in. If you want to know if I am listening, you can say, hey Pat, or, Pat are you there. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak: Pat, "PA 1 pre ask" Goto : ASK @GotPatientPhrase # Saving conversation conversationTranscript = "{conversationTranscript}, Prompt {askPrompt} Reply {askReturnValue}\n" ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) #if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: #if {askReturnValue} STARTSWITH {inProgressList[*]}: #Case: #Name Speak: Pat, "I'm sorry {userName} that is under construction." # inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" if {askReturnValue} CONTAINS {gatherSymptomsList}: Name Speak: Pat, "Gathering Symptoms" returnLabel = AskingSymptoms askPrompt = "Please describe me your symptoms" Goto : ASK @AskingSymptoms userSymptoms = "{userSymptoms}, {askReturnValue}" Name Speak: Pat, "I heard you say {userSymptoms}" # Reconvey: {userSymptoms} Name Speak: Pat, "Thank you. I am sending these symptoms to your caregiver." conversationTranscript = "{conversationTranscript}, Prompt {askPrompt} Reply {askReturnValue}\n" returnLabel = GotPatientPhrase askPrompt = "" # Email: "{userName} has Symptoms", userSymptoms # testing how transcript works if {askReturnValue} == "transcript": Name Speak: Pat, "{conversationTranscript}" # Email the transcript of the conversation # TODO Think about how to limit the number of phrases sent if {askReturnValue} CONTAINS {emailScriptList[*]}: Name Speak: Pat, "About to send you the transcript of our conversation" Email: "Conversation Transcript", conversationTranscript # Set an alarm delegating execution to the alert.neon skill # TODO: Checkout the alerts __init__ for handle_snooze alerts error if {askReturnValue} CONTAINS {alarmScriptList}: Name Speak: Pat, "I heard you want to set up an alarm" Execute: {askReturnValue} ### Later: Add flexible calls for help .. eg. contains emergency or help twice, I feel xyz, I'm going to xyz ### Name Speak: Pat, "Not alert, listen again" Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak: Pat, "Pat the Patient Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp Goto : ASK @ConfirmHelp ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Pat, "Pat the Patient Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak: Pat, "PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : Goto: Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak: Pat, "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak: Pat, "Pat the Patient Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak: Pat, "Did reconvey of jk" ## Patient said jk so restart listening Name Speak: Pat, "Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Pat, "{userName}! Needs! Help! This is an EMERGENCY" Name Speak: Pat, "Pat the Patient Assistant would now send an emergency alert, sound an alarm, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak: Pat, "Pat test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak: Pat, "Pat is restarting. Thanks again." Goto: StartUp Name Speak: Pat, "Pat exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Pat, "Ask 1 Starting" if {askPrompt}: Name Speak: Pat, " {askPrompt} " ### Name Speak: Pat, "Ask 2 Starting ask subroutine" voice_input {askReturnValue} ### Name Speak: Pat, "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Pat, "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input{askReturnValue} if {askReturnValue} IN {yesList[*]}: Name Speak: Pat, "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak: Pat, "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak: Pat, " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Pat, "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Pat, "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak: Pat, "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

Script: "Patient Assistant" Language: en-us, male # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30, TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak: Pat, "Neon Patient Assistant Application Demonstration Version 2020 07 07 18:00 Testing" Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" #askPrompt #returnLabel #heardSilence falseAlarmCount = 0 #askReturnValue #userName #moreAppInfo #customizeSettings #customizeLanguage customProsody = "rate='medium'" #photoTime # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak: Pat, "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak : Pat, "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak: Pat, "Before starting the Patient Assistant, would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input(moreAppInfo) if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak: Pat, "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) Name Speak: Pat, "Would you like to customize the Patient Assistant settings for my voice?" # Name Speak: Pat, "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input(customizeSettings) if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak: Pat, "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak: Pat, "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input(customizeSettings) if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant customLanguage = "" # Variable: britWords = british, gb, uk #if {customizeSettings} CONTAINS "British": if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak: Pat, " Your demonstration patient assistant has signed in. You can say, hey Pat, or, Pat are you there, if you want to know if I am listening. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak: Pat, "PA 1 pre ask" Goto : ASK @GotPatientPhrase ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ### Name Speak: Pat, "PA 4 not an alert, listen again" Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak: Pat, "PA 5 got alert, about to reconvey {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp ### Name Speak: Pat, "PA 7 about to ask to cancel help request" Goto : ASK @ConfirmHelp ### Name Speak: Pat, "PA 8 check for jk" ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak: Pat, "Pat the Patient Assistant heard nothing." Name Speak: Pat, "PA 7 got alert, about to reconvey of heard nothing {askReturnValue}" Reconvey : askReturnValue Name Speak: Pat, "PA 8 did reconvey of nothing?" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == "TRUE": Goto: Emergency heardSilence = "TRUE" ## LATER: Increase volume, speak slower Name Speak: Pat, "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak: Pat, "Pat the Patient Assistant heard you say this is not an emergency." Reconvey : askReturnValue Name Speak: Pat, "Please say help again if this is an emergency." ### Name Speak: Pat, "PA 9 jk so restart listening" Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak: Pat, "This is an EMERGENCY" Name Speak: Pat, "Pat the Patient Assistant would now send an emergency alert, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak: Pat, "Pat test completed. Say start again to start again?" voice_input(askReturnValue) ### Name Speak: Pat, "PA 10 check for restart request" if {askReturnValue} == "start again": ### Name Speak: Pat, "PA 10 restarting" Goto: StartUp Name Speak: Pat, "Pat exiting" exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak: Pat, "Ask 1 Starting" if {askPrompt}: Name Speak: Pat, " {askPrompt} " ### Name Speak: Pat, "Ask 2 Starting ask subroutine" voice_input(askReturnValue) ### Name Speak: Pat, "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak: Pat, "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input(askReturnValue) if {askReturnValue} IN {yesList[*]}: Name Speak: Pat, "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak: Pat, "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak: Pat, " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak: Pat, "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak: Pat, "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak: Pat, "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

# Subroutine Test Script: "Subroutine Test" Name Speak : Patty, "Version 20200624 18:33 Subroutine Test" ## Initialize Variable: exitList = "Patty exit", "Patty cancel", "never mind" Variable: noList = "no", "not now", "never mind", "nope", "n" Variable: yesList = "yes", "yup", "y" Variable: alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "I need a doctor", "I need a doctor", "I need a doctor", "I need a doctor", "I need a doctor", "I need a nurse", "I need aid", "I need a caregiver", "I need assistance", "I fell", "I can't get up" Variable: heyPattyList = "hey Patty", "Patty are you there" Variable: askPrompt Variable: returnLabel = InstallAssistant Variable: askInput = "Hi, I'm Patty. Say your name, or cancel." Goto : ASK @InstallAssistant userName = askInput Name Speak : Patty : "Hi {userName}. I am glad you chose to test subroutines." Name Speak : Patty : "Patty Exiting" exit ## @ASK if {askPrompt} != "" Name Speak : Patty, "{askPrompt}" voice_input {askInput} if {askInput} IN {exitList[*]}: Name Speak : Patty, "Say yes to confirm exiting Patty" voice_input(askInput) if {askInput} IN {yesList[*]}: Name Speak : Patty, "Patty, signing off" exit else goto : ASK if {askInput} IN {heyPattyList[*]}: Name Speak : Patty, "Patty, the Neon AI Patient Assistant, is listening" goto : ASK Name Speak : Patty, "About to return to {returnLabel}" Goto: {returnLabel}

Script: "Table Scrape Demo" # TODO: This function has changed Variable: options = table_scrape(https://www.neongecko.com/demos) Variable: chosen Neon speak: "Please tell me what kind of help video you would like to see. You can say things like random(options)" voice_input(chosen) Neon speak: "Okay" Execute: "av play closest(chosen,options)" Exit

Script: Test Eliza Language: en-GB, female Variable: input Variable: split_input # Static Strings Variable: initial = It's nice to meet you. How are you today? Variable: final = Goodbye. Thank you for talking to me. Variable: quit = bye, goodbye, quit # Substitutions Variable: input_sub = dont don't, cant can't, wont won't, recollect remember, dreamt dreamed, dreams dream, maybe perhaps, when what, certainly yes, machine computer, computers computer, were was, "you're" "you are", "i'm" "i am", same alike # Synonyms Variable: belief = belief, feel, think, believe, wish Variable: family = family, mother, mom, father, dad, sister, brother, wife, children, child Variable: desire = desire, want, need, wish Variable: sad = sad, unhappy, depressed, sick Variable: happy = happy, elated, glad, better Variable: cannot = cannot, can't Variable: everyone = everyone, everybody, nobody, noone Variable: people = people, they, others, adults, children, teenagers Variable: be = be, am, is, are, was Variable: sorry = sorry, i apologize Variable: language = deutsch, francais, italiano, espanol # Input to response matching Variable: key_sub = "{sorry_0} [sorry] for {Vsorry}" "Please don't apologize about {Vsorry}" "No need to apologize about {Vsorry[*]}" "I've told you that apologies are not required." "Vsorry's are {Vsorry[*]}", "i remember {Viremember}" "Do you often think of {Viremember}?" "Does thinking of {Viremember} bring anything else to mind?" "What else do you recollect?" "Why do you recollect {Viremember} just now?" "What in the present situation reminds you of {Viremember}?" "Viremember's are {Viremember[*]}", "do you remember {Vyouremember}" "Did you think I would forget {Vyouremember}?" "Why do you think I should recall {Vyouremember} now?" "What about {Vyouremember}? "You mentioned {Vyouremember}?" "Vyouremember's are {Vyouremember[*]}", "if {Vif}" "Do you think its likely that {Vif}?" "Do you wish that {Vif}?" "What do you know about {Vif}?" "Really, if {Vif}?" "Vif's are {Vif[*]}", "{Vdreamed} dreamed {Vdreamed2}" "Really, {Vdreamed2}?" "Have you ever fantasized {Vdreamed2} while you were awake?" "Have you ever dreamed {Vdreamed2} before?" "Vdreamed2's are {Vdreamed2[*]}", "dream" "What does that dream suggest to you?" "Do you dream often?" "What persons appear in your dreams? "Do you believe that dreams have something to do with your problems?", "perhaps" "You don't seem quite certain." "Why the uncertain tone?" "Can't you be more positive?" "You aren't sure?" "Don't you know?", "name" "I am not interested in names." "I've told you before, I don't care about names -- please continue.", "{Vlanguage}[language]{Vlanguage2}" "I speak only English" "I do not speak {[language]}", "hello" "How do you do. Please state your problem." "Hi. What seems to be your problem?", "how are you" "We were discussing you -- not me.", "are you {Vareyou}" "Why are you interested in whether I am {Vareyou} or not?" "Would you prefer if I weren't {Vareyou}?" "Perhaps I am {Vareyou} in your fantasies." "Do you sometimes think I am {Vareyou}?" "Vareyou's are {Vareyou[*]}", "computer" "Do computers worry you?" "Why do you mention computers?" "What do you think machines have to do with your problem?" "Don't you think computers can help people?" "What about machines worries you?" "What do you think about machines?", "am i {Vami}" "Do you believe you are {Vami}?" "Would you want to be {Vami}?" "Do you wish I would tell you you are {Vami}?" "What would it mean if you were {Vami}?" "Vami's are {Vami[*]}", "[people] are {Vpeople}" "Did you think they might not be {Vpeople}?" "Would you like it if they were not {Vpeople}?" "What if they were not {Vpeople}?" "Possibly they are {Vpeople}." "Vpeople's are {Vpeople[*]}", "was i {Vwasi}" "What if you were {Vwasi}?" "Do you think you were {Vwasi}?" "Were you {Vwasi}?" "What would it mean if you were {Vwasi}?" "What does {Vwasi} suggest to you ?" "Vwasi's are {Vwasi[*]}", "i was {Viwas}" "Were you really?" "Why do you tell me you were {Viwas} now?" "Perhaps I already know you were {Viwas}." "Viwas's are {Viwas[*]}", "was you {Vwereyou}" "Would you like to believe I was {Vwereyou}?" "What suggests that I was {Vwereyou}?" "What do you think?" "Perhaps I was {Vwereyou}." "What if I had been {Vwereyou}?" "Vwereyou's are {Vwereyou[*]}", "i am {Vsad} [sad]" "I am sorry to hear that you are {[sad]}." "Do you think that coming here will help you not to be {[sad]}?" "I'm sure it's not pleasant to be {[sad]}." "Can you explain what made you {[sad]}?", "i am {Vhappy} [happy]" "How have I helped you to be {[happy]}?" "Has your treatment made you {[happy]}?" "What makes you {[happy]} just now?" "Can you explain why you are suddenly {[happy]}?", "i [belief] {Vbelief1} i {Vbelief2}" "Do you really think so?" "But you are not sure you {Vbelief2}." "Do you really doubt you {Vbelief2}?" "Vbelief2's are {Vbelief2[*]}", "i am {Viam}" "Is it because you are {Viam} that you came to me?" "How long have you been {Viam}?" "Do you believe it is normal to be {Viam}?" "Do you enjoy being {Viam}?" "Viam's are {Viam[*]}", "i [cannot] {Vicannot}" "Why do you think that you can't {Vicannot}?" "Have you tried?" "Perhaps you could {Vicannot} now." "Do you really want to be able to {Vicannot}?" "Vicannot's are {Vicannot[*]}", "i don't {Vidont}" "Don't you really {Vidont}?" "Why don't you {Vidont}?" "Do you wish to be able to {Vidont}?" "Does that trouble you?" "Vidont's are {Vidont[*]}", "do i feel {Vdoifeel}" "Tell me more about such feelings." "Do you often feel {Vdoifeel}?" "Do you enjoy feeling {Vdoifeel}?" "Of what does feeling {Vdoifeel} remind you?" "Vdoifeel's are {Vdoifeel[*]}", "i {Viyou} you" "Perhaps in your fantasies we {Viyou} each other." "Do you wish to {Viyou} me?" "You seem to need to {Viyou} me." "Do you {Viyou} anyone else?" "Viyou's are {Viyou[*]}", "you are {Vyouare}" "What makes you think I am {Vyouare}?" "Does it please you to believe I am {Vyouare}?" "Do you sometimes wish you were {Vyouare}?" "Perhaps you would like to be {Vyouare}." "Vyouare's are {Vyouare[*]}", "you {Vyoume} me" "Why do you think I {Vyoume} you?" "You like to think I {Vyoume} you, don't you ?" "What makes you think I {Vyoume} you?" "Really, I {Vyoume} you?" "Do you wish to believe I {Vyoume} you?" "Suppose I did {Vyoume} you -- what would that mean?" "Does someone else believe I {Vyoume} you?" "Vyoume's are {Vyoume[*]}", "yes" "You seem to be quite positive." "You are sure." "I see." "I understand.", "no" "Are you saying no just to be negative?" "You are being a bit negative." "Why not?" "Why 'no'?", "my {Vmyfamily1} [family] {Vmyfamily2}" "Tell me more about your {[family]}." "Who else in your family {Vmyfamily2}?" "Your {[family]}?" "What else comes to mind when you think of your {[family]}?" "Vmyfamily2's are {Vmyfamily2[*]}", "i [desire] {Vdesire}" "What would it mean to you if you got {Vdesire}?" "Why do you want {Vdesire}?" "Suppose you got {Vdesire} soon?" "What if you never got {Vdesire}?" "What would getting {Vdesire} mean to you?" "What does wanting {Vdesire} have to do with this discussion?" "Vdesire's are {Vdesire[*]}", "what" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "because" "Is that the real reason?" "Don't any other reasons come to mind?" "Does that reason seem to explain anything else?" "What other reasons might there be?", "why don't you {Vwhydontyou}" "Do you believe I don't {Vwhydontyou}?" "Perhaps I will {Vwhydontyou} in good time." "Should you {Vwhydontyou} yourself?" "You want me to {Vwhydontyou}?" "Vwhydontyou's are {Vwhydontyou[*]}", "why can't i {Vwhycanti}" "Do you think you should be able to {Vwhycanti}?" "Do you want to be able to {Vwhycanti}?" "Do you believe this will help you to {Vwhycanti}?" "Have you any idea why you can't {Vwhycanti}?" "Vwhycanti's are {Vwhycanti[*]}", "why" "Why do you ask?" "Does that question interest you?" "What is it you really wanted to know?" "Are such questions much on your mind?" "What answer would please you most?" "What do you think?" "What comes to mind when you ask that?" "Have you asked such questions before?" "Have you asked anyone else?", "[everyone] {Veveryone}" "Really, {[everyone]}?" "Surely not {[everyone]} {Veveryone}." "Can you think of anyone in particular ?" "Who, for example?" "Are you thinking of a very special person?" "Who, may I ask?" "Someone special perhaps?" "You have a particular person in mind, don't you?" "Who do you think you're talking about?" "Veveryone's are {Veveryone[*]}", "always" "Can you think of a specific example?" "When?" "What incident are you thinking of?" "Really, always?", "alike" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "[be] like" "In what way?" "What resemblance do you see?" "What does that similarity suggest to you?" "What other connections do you see?" "What do you suppose that resemblance means?" "What is the connection, do you suppose?" "Could here really be some connection?" "How?", "can you {Vcanyou}" "You believe I can {Vcanyou} don't you?" "You want me to be able to {Vcanyou}." "Perhaps you would like to be able to {Vcanyou} yourself." "Vcanyou's are {Vcanyou[*]}", "can i {Vcani}" "Whether or not you can {Vcani} depends on you more than me." "Do you want to be able to {Vcani}?" "Perhaps you don't want to {Vcani}." "Vcani's are {Vcani[*]}", "your {Vyour}" "Why are you concerned over my {Vyour}?" "What about your own {Vyour}?" "Are you worried about someone else's {Vyour}?" "Really, my {Vyour}?" "Vyour's are {Vyour[*]}", "my {Vmy}" "Your {Vmy}?" "Why do you say your {Vmy}?" "Does that suggest anything else which belongs to you?" "Is it important that your {Vmy}?" "Vmy's are {Vmy[*]}", "you {Vyou}" "We are discussing you -- not me." "Oh. I {Vyou}?" "You're not really talking about me -- are you?" "What are your feelings now?" "Vyou's are {Vyou[*]}", "i {Vi}" "You say {Vi}?" "Can you elaborate on that?" "Do you say {Vi} for some special reason?" "That's quite interesting." "Vi's are {Vi[*]}", "thank you" "you are welcome" "don't mention it" "no problem", "[quit]" "{final}", "{Vx}" "I'm not sure I understand you fully." "Please go on." " What do you mean by {Vx}?" "Do you feel strongly about discussing such things?" "Vx's are {Vx[*]}" Name speak: Eliza, {initial} LOOP pre voice_input(input) Set: user_speech = {input} sub_values(input, input_sub) sub_key(input, key_sub) Name speak: Eliza, {input} if {user_speech} in {quit}: Exit LOOP pre END Neon speak: {final} Exit

Script: Test Email Variable: body = "Test email body\nnewline" Neon speak: "sending email" Email: "My Email Title", body Exit

Script: "Test Neon Demo" Variable: test_set Neon speak: "Please select your test preference. You can choose from the following demos: 'personal' for profile setup" "'language' for translation," "'standard'," "'clapper or clap'," "'av or music'," "'picture or record'," "'caffeine'," "'email'," "'coupons'," "'summary'," "'clear'," "'alarm or timer'," "'wakewords or wake words'," "'dialog', or " "'control' group tests." voice_input(test_set) Case: {test_set} "personal" Execute: "neon my name is Joshua Test" "neon my name is John Jacob Jingleheimer Smith" "neon tell me my first name" "neon tell me my last name" "neon tell me my full name" "neon my email address is josh@neongecko.com" "language" Execute: "neon translate cherry to russian" "neon tell me my language setting" "neon speak to me in english" "neon speak to me in Russian and French" "neon speak to me in english" "standard" Execute: "neon say hello world" Execute: "what is the time" Execute: "what is today's date" Execute: "what time is it in paris" Execute: "what is the weather in seattle" Execute: "neon spell microphone" Execute: "what is 25 times 71" Execute: "what is the derivative of x squared" Execute: "what is the share price for ibm" Execute: "tell me a joke" Execute: "tell me about linux" Execute: "send me the source for that" Execute: "where are you" Execute: "who are you" Execute: "my location is Seattle, WA" Execute: "what is my ip address" "clapper or clap" Execute: "Set up clapper process" Execute: "Quit clapper process" Execute: "Deny clapper process by default" Execute: "Enable clapper process by default" "av or music" Execute: "neon av play Relaxing jazz radio" Execute: "neon av play Sleepy blues piano radio" Execute: "pause" Execute: "resume" Execute: "stop" Execute: "avplay american folk guitar radio" Execute: "increase volume" Execute: "decrease volume" Execute: "mute volume" Execute: "unmute volume" Execute: "what is the volume" Execute: "neon play the latest news" "picture or record" Execute: "take a picture" Execute: "show me my last picture" Execute: "take a 3-second video" Execute: "show me my last video" Execute: "neon record 3 seconds" Execute: "playback my last recording" "caffeine" Execute: "how much caffeine is in sprite" Execute: "how about j street coffee" Execute: "how much caffeine is in a cherry coke" "email" Execute: "email me my transcripts" "coupons" Execute: "neon update my brands" Execute: "i like google" Execute: "tell me coupons for microsoft" Execute: "i like neon" Execute: "tell me my likes" Execute: "i do not like alpha" Execute: "tell me my dislikes" Execute: "tell me my coupons" Execute: "email me my coupons" "summary" Execute: "neon talk to me in Russian" Execute: "what time is it in Moscow" Execute: "what is the weather in Moscow" Execute: "tell me about electricity" Execute: "what is 625 divided by 25" Execute: "tell me my likes" Execute: "how many inches are in a mile" Execute: "translate cherry to French" Execute: "how much caffeine is in pepsi" Execute: "talk to me in English" Execute: "change units/measuring system" "clear" Execute: "I want to clear my user brands" Execute: "I want to clear my user likes" Execute: "clear all of my user data" "alarm or timer" Execute: "neon set an alarm for 6:30 pm" Execute: "neon remind me to go home at 7 pm" Execute: "neon set a 2 minute timer" Execute: "neon how much time is left" Execute: "neon clear all reminders" Execute: "cancel all alarms" Execute: "cancel all timers" "wakewords or wake words" Execute: "require wakewords" Execute: "begin skipping wake words" Execute: "i am not alone" Execute: "neon i am alone" "dialog" Execute: "switch to primary dialogue mode" Execute: "how are you?" Execute: "switch to random dialogue mode" Execute: "how are you?" "control" Execute: "create a support ticket" Execute: "i want [you] to exit" Execute: " i want [you] to shutdown" Execute: "what is my current software version" Exit

Script: "Test Pat" Language: "en-us male" # Set up wait time for patient responses Variable: timeoutReturnLabel = AnnounceVersion Timeout: 30 TIMEOUT # Announce version ("Testing" is displayed as text and is not spoken) @AnnounceVersion Name Speak : Pat : "Neon Patient Assistant Application Demonstration Version 2020 07 09 18:22 again Testing" Variable: True = 1 Variable: False = 0 Variable: exitList = "exit", "cancel", "never mind" Variable: noList Variable: yesList Variable: alertsPhraseList Variable: inProgressList Variable: heyPatList Variable: askPrompt Variable: returnLabel Variable: heardSilence Variable: falseAlarmCount Variable: askReturnValue = "" Variable: userName Variable: moreAppInfo Variable: customizeSettings Variable: customizeLanguage Variable: customizeProsody Variable: photoTime Variable: enableNeonApps @StartUp # Initialize # exitList = "exit", "cancel", "never mind" noList = "no", "not now", "never mind", "nope", "n" yesList = "yes", "yup", "y" alertsPhraseList = "help", "I need help", "help me", "emergency", "this is an emergency", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a doctor", "i need a nurse", "i need aid", "i need a caregiver", "i need assistance", "i fell", "i can't get up", "fire" inProgressList = "hey pat", "pat are you there", "is anybody listening", "what time is it", "Remind me to", "Play", "Email", "Record" heyPatList = "hey pat", "pat are you there", "is anybody listening", "what time is it" speechGenderList = "female", "male" speechRateList = "medium", "fast", "slow" speechAccentList = "American", "British" or "Australian" askPrompt = "" returnLabel = "" heardSilence = "" falseAlarmCount = 0 askReturnValue = "" userName = "" moreAppInfo = "" customizeSettings = "" customizeLanguage = "" customProsody = "rate='medium'" photoTime = "" enableNeonApps = {True} # Ask to install assistant @PromptInstallAssistant returnLabel = InstallAssistant timeoutReturnLabel = PromptInstallAssistant Name Speak : Pat : "Hi, I'm Pat. I'm a demonstration patient assistant from Neon AI. Thank you for helping test my conversational skills." askPrompt = "Please tell me your name, or you can say cancel to exit." Goto : ASK @InstallAssistant userName = {askReturnValue} Name Speak : Pat : "Hi {userName}. I am glad you chose to install the Neon Patient Assistant Application." ## Offer additional information @ReAskMoreInfo Name Speak : Pat : "Before starting the Patient Assistant, would you like more information on the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskMoreInfo voice_input{moreAppInfo} if {moreAppInfo} IN {noList[*]}: Goto: PromptCustomize Name Speak : Pat : "Hi {userName}. I'm Pat the demonstration conversational patient assistant from Neon AI. I am an artificial intelligence personal assistant, I'm augmented with Neon Gecko open source code and CPI Corp patented technology. Neon AI makes the Patient Assistant application to enable patients to alert their caregivers to emergencies and other needs, and to get simple information. As your automated patient assistant I listen for calls for help and send alerts to the patient care administrator. For example, you can say help, or I fell. Another thing you can say is what time is it .. In the future you will be able to play your favorite music, turn the lights on or off, and even ask to send a text message .. And if you don't want to call me Pat, someday you will be able to change my name." # Customize @PromptCustomize ## Offer customization of settings for administrator, voice and system settings ## Set up PA voice: name, gender, accent, pitch, speed, [Later: language, diction, empathy] ## Set up system settings: timeoutSeconds (wait time for user input) ## Set up administrator (password, email, name, phone, [Later: staff names, secondary contacts] ..) ## Set up nurse (password, email, name, phone, [Later: staff names, secondary contacts] ..) customLanguage = "" enableNeonApps = {True} Name Speak : Pat : "Would you like to customize the Patient Assistant settings to disable non-emergency Neon AI patient applications, or to change my voice?" # Name Speak : Pat : "Would you like to customize the Patient Assistant settings for administrator, voice and PAT system settings?" timeoutReturnLabel = PromptCustomize voice_input{customizeSettings} if {customizeSettings} !IN {yesList[*]}: Goto: BeginAssistant Name Speak : Pat : "Hi {userName}. You can customize the voice for the Neon demonstration conversational patient assistant. You can say no change, or say female, male, normal, fast, slow, American, British or Australian. In the future you will be able to set up information for the administrator, staff members and the patient, and change my name and other PAT system settings." @ReAskCustomize # Name Speak : Pat : "Would you like to change the voice of the Neon conversational patient assistance application?" timeoutReturnLabel = ReAskCustomize voice_input{customizeSettings} if {customizeSettings} == "": Goto: PromptCustomize if {customizeSettings} CONTAINS "no change": Goto: BeginAssistant if {customizeSettings} IN {noList[*]}: Goto: BeginAssistant # Variable: britWords = british, gb, uk if {customizeSettings} CONTAINS british, gb, uk: customLanguage = "'en-GB'" else if {customizeSettings} CONTAINS "Australian, AU, aussie": customLanguage = "en-AU" else customLanguage = "en-us" if {customizeSettings} CONTAINS "female": customLanguage = "{customLanguage} female" else customLanguage = "{customLanguage} male" Language: {customLanguage} if {customizeSettings} CONTAINS "fast": customProsody = "rate='fast'" else if {customizeSettings} CONTAINS "slow": customProsody = "rate='slow'" else customProsody = "rate='medium'" # Later: Provide example of new Language/Prosody and offer reset # Later: Make settings into a case statement and error check: # split_words(wordList, customizeSettings) # customSettingCount = length({wordList}) # wordListIndex = 0 # LOOP # Case # LOOP END @ReAskApps Name Speak : Pat : "Would you like to enable more Neon patient assistance applications including playing music, playing games, reminders for medicine, hydration, meals and sleep, requests to record symptoms or other stats, and to request general information or assistance with math?" timeoutReturnLabel = ReAskApps voice_input{customizeSettings} if {customizeSettings} == "": Goto: ReAskApps if {customizeSettings} IN {noList[*]}: enableNeonApps = {False} Goto: BeginAssistant @BeginAssistant timeoutReturnLabel = WaitForAlertPhrase Name Speak : Pat : " Your demonstration patient assistant has signed in. If you want to know if I am listening, you can say, hey Pat, or, Pat are you there. " # Wait for alert @WaitForAlertPhrase askPrompt = "" returnLabel = GotPatientPhrase ### Name Speak : Pat : "PA 1 pre ask" Goto : ASK @GotPatientPhrase ## Did patient ask for "help" if {askReturnValue} !IN {alertsPhraseList[*]}: ## Not an emergency alert, check for secondary (in progress) if {enableNeonApps}: ## if {askReturnValue} CONTAINS {inProgressList[*]}: if {askReturnValue} STARTSWITH {inProgressList[*]}: Name Speak : Pat : "I'm sorry {userName} that is under construction." ## Not an alert, listen again Goto: WaitForAlertPhrase # Possible EMERGENCY Name Speak : Pat : "Pat the Patient Assistant heard an emergency alert. I heard {askReturnValue}" Reconvey : askReturnValue Name Speak : Pat : "PA 6 did reconvey" @PromptConfirmHelp askPrompt = "Please say just kidding if this is not an emergency" returnLabel = ConfirmHelp Goto : ASK @ConfirmHelp ## Did patient REALLY ask for "help"? if {askReturnValue} == "": Name Speak : Pat : "Pat the Patient Assistant heard nothing. I heard" Reconvey : askReturnValue Name Speak : Pat : "PA 8 did reconvey of nothing heard" ## PA heard nothing after emergency request .. if second time then this is an emergency if {heardSilence} == {True} : Goto: Emergency heardSilence = {True} ## Increase volume and speak slowly Name Speak : Pat : "{userName}! I need to hear from you! Is this an emergency?" Goto: PromptConfirmHelp if {askReturnValue} CONTAINS "just kidding", "never mind","not an emergency": Name Speak : Pat : "Pat the Patient Assistant heard you say this is not an emergency. I heard" Reconvey : askReturnValue ### Name Speak : Pat : "Did reconvey of jk" ## Patient said jk so restart listening Name Speak : Pat : "Please say help again if this is an emergency." Python: falseAlarmCount = {falseAlarmCount} + 1 Goto: WaitForAlertPhrase # EMERGENCY @Emergency Name Speak : Pat : "{userName}! Needs! Help! This is an EMERGENCY" Name Speak : Pat : "Pat the Patient Assistant would now send an emergency alert, sound an alarm, keep engaged with the patient, and send updated alerts to the caregiver." Name Speak : Pat : "Pat test completed. Say start again to start again?" voice_input{askReturnValue} if {askReturnValue} == "start again": Name Speak : Pat : "Pat is restarting. Thanks again." Goto: StartUp Name Speak : Pat : "Pat exiting. Thanks again for helping test my skills." exit # ========== Subroutines @ASK # The ASK subroutine speaks the askPrompt and waits for a response. If the response is a command to Pat to perform an action, then the request is effected and Pat continues waiting for a response, otherwise, the response is returned to the caller in the askReturnValue. # Input parameters: askPrompt, returnLabel and timeOutReturnLabel # Result parameter: askReturnValue ### Name Speak : Pat : "Ask 1 Starting" if {askPrompt}: Name Speak : Pat : " {askPrompt} " ### Name Speak : Pat : "Ask 2 Starting ask subroutine" voice_input {askReturnValue} ### Name Speak : Pat : "Ask 3 got input" if {askReturnValue} IN {exitList[*]}: Name Speak : Pat : "Say yes to confirm exiting Pat, the Neon AI Patient Assistant" voice_input{askReturnValue} if {askReturnValue} IN {yesList[*]}: Name Speak : Pat : "Pat, the Neon AI Patient Assistant, signing off" exit else goto: ASK ### Name Speak : Pat : "Ask 4 not cancel command {askReturnValue}" if {askReturnValue} IN {heyPatList[*]}: Name Speak : Pat : " {userName}, Pat the AI Patient Assistant demo here. I'm listening all the time but I don't record everything you say. I only make recordings of calls for help or in an emergency. " # Note - Disambiguation for the pronunciations of "record": record Verb as in "I record everything you say" vs. Noun as in "Make a record of the conversation". Name Speak : Pat : "The time is" Execute : "Neon what time is it" if {falseAlarmCount} != 0: Name Speak : Pat : "The false alarm count is {falseAlarmCount}!" goto : ASK ### Name Speak : Pat : "Ask 5 About to return to {returnLabel}" Goto: {returnLabel} @TIMEOUT Goto: {timeoutReturnLabel}

Script: "Test SSML" Variable: input Neon Speak: "Hi. I can put a break in my speech, or I can emphasize a word." Neon Speak: I know that W3C is W3C Neon Speak: "I can be loud, or I can be quiet." Neon Speak: "I can talk very quickly, or a little faster, or talk slowly, or talk much slower" Neon Speak: "I can make my voice much higher, or just a little higher, or lower, "or much lower" Neon Speak: "I can speak 2/7 as 2/7, or 2/7" Neon Speak: "I can spell out words and a 3 digit number words and 321." Name Speak: Nobody, "Or I can speak as someone else." Name Speak: Fast Famale, "I can be loud, fast, and high" Name Speak: Slow Male, "I can be quiet, slow, and deep" Exit

Script: Test Upload Author: Daniel McKnight Description: This is only a test # Comment line # Above was a newline Exit

Script: "User Register Demo" Variable: full_name Variable: first_name Variable: last_name Variable: selection Neon speak: "Hello human. My full name is Neon Gecko Inc. Please call me Neon. Lets get started." LOOP get_name Neon speak: "Please tell me your full name or say exit" voice_input(full_name) Execute: "neon my name is {full_name}" Neon speak: "Thank you." Python: time.sleep(5) Execute: "neon tell me my first name" Execute: "neon tell me my last name" LOOP change_name Neon speak: "Is that correct? Say yes, no, change first name, change last name or exit" voice_input(selection) Case: {selection} "yes" Neon speak: "Okay" Execute: "exit" "no" Neon speak: "Sorry. Please say name to try again" LOOP get_name END "change first name" Neon speak: "Tell me your first name or say exit" voice_input{first_name} Execute: "neon my first name is {first_name}" Execute: "neon tell me my first name" LOOP change_name END "change last name" Neon speak: "Tell me your last name or say exit" voice_input{last_name} Execute: "neon my last name is {last_name}" Execute: "neon tell me my last name" LOOP change_name END Exit

Script: "Variable Demo" Language: en-au, female Variable: location Variable: info_type = time, weather, population Neon speak: "Say select_one(info_type) for world info" voice_input(info_type) Neon speak: "What location would you like?" voice_input(location) Execute: "What is the {info_type} in {location}" Exit

Script: "Demo Weather Loop" Variable: {location}: "" Variable: {forecast}: "" LOOP WW Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" "Say exit to exit" voice_input{location} Case {location}: "A or Athens" Execute: "What is the weather in Athens" Neon speak: "about to repeat A" "B or Bombay" Execute: "What is the weather in Bombay" Neon speak: "say 10 day or 5 day forecast" voice_input{forecast} Case {forecast}: "10 day or 10" Execute: "What is the 10 day forecast for Bombay" "5 day or 5" Execute: "What is the 5 day forecast for Bombay" Neon speak: "about to repeat B" "S or Seattle" Execute: "What is the weather in Seattle" Neon speak: "about to repeat S" Neon speak: "End of loop WW." LOOP WW END Neon speak: "I'm done now." Exit

Script: "Weather Time Population Goto" Language: en-au, female Synonym: "Demo WTP Goto" Variable: response Neon speak: "Say 1 or World Times for world times" "Say 2 or World Weather for world weather" "Say 3 or World Populations for world populations" voice_input(response) Case {response}: "1 or World Times" Neon speak: "Say A or Athens for Athens's time" "Say B or Bombay for Bombay's time" "Say S or Seattle for Seattle's time" voice_input(response) Case {response}: "A or Athens" Execute: "What time is it in Athens" Goto: athens_weather "B or Bombay" Execute: "What time is it in Bombay" "S or Seattle" Execute: "What time is it in Seattle" "2 or World Weather" Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" voice_input(response) Case {response}: "A or Athens" @athens_weather Execute: "What is the weather in Athens" Goto: 50 "B or Bombay" Execute: "What is the weather in Bombay" "S or Seattle" Execute: "What is the weather in Seattle" "3 or World Populations" Neon speak: "Say A or Athens for Athens's population" "Say B or Bombay for Bombay's population" "Say S or Seattle for Seattle's population" voice_input(response) Case {response}: "A or Athens" Execute: "What is the population of Athens" "B or Bombay" Execute: "What is the population of Bombay" "S or Seattle" Execute: "What is the population of Seattle" Exit

Script: "Website Navigator" # Synonym: "demo website navigator" # Synonym: "website navigator demo" # Language: "English American Female" Variable: options = table_scrape(https://neongecko.com) # Variable: {options}: demos: https://www.neongecko.com/demos , videos: https://www.neongecko.com/demos , nano: https://www.neongecko.com/NeonNanoforWebsiteDesigners , audible: https://www.neongecko.com/NeonAudibleAiTech , tools: https://www.neongecko.com/NeonTechnology , websites: https://www.neongecko.com/neonnano , phones: https://www.neongecko.com/NeonAndroid , devices: https://www.neongecko.com/NeonAIforHome Variable: chosen # Neon speak: "Options: {options}" Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like {random(options)} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to closest(chosen,options)" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Script: "Website Navigator Timeout" Variable: options = table_scrape(https://neongecko.com) Variable: chosen Timeout: 10, instructions #Timeout: 10 7 @instructions Neon speak: "Please tell me what Neon AI web page you'd like to see. You can say things like random{options} or say quit or exit." LOOP WN voice_input(chosen) # Neon speak: "navigating to {chosen}" if {chosen} == "quit": Neon speak: "say pause to turn off the mic or say exit to close the window." voice_input(chosen) if {chosen} == "pause": # execute skill to turn off mic Execute: "neon mute microphone" else: if closest(chosen,options): Execute: "neon browse to {closest(chosen,options)}" else: Neon speak: "Page not found" Neon speak: "Tell me another Neon AI web page you'd like to see or say quit." LOOP WN END Exit

Script: "Welcome" Variable: name Variable: like Variable: location Variable: question Neon Speak: "Hello, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "Nice to meet you {name}" Neon Speak: "tell me a brand you like, for example, I like neon" voice_input(like) Execute: "tell me my coupons" Neon Speak: "Where are you" voice_input(location) Execute: "tell me the time in {location}" Execute: "tell me the weather in {location}" Neon Speak: "Please ask me a question or say exit" voice_input(question) if {question} == "exit" Exit Execute: "{question}" Exit

Script: "Welcome Loops Demo" Variable: name Variable: like Variable: location Variable: question Neon Speak: "Hello, My name is Neon." Neon Speak: "What is your name?" voice_input(name) Neon Speak: "Nice to meet you {name}" Neon Speak: "tell me a brand you like, for example, I like neon" voice_input(like) Execute: "tell me my coupons" Neon Speak: "Where are you" voice_input(location) Execute: "tell me the time in {location}" Execute: "tell me the weather in {location}" LOOP Q1 Neon Speak: "Please ask me a question or say exit" if {question} == "exit" Exit voice_input(question) #Execute: "{question}" LOOP Q1 END Exit

Script: "Welcome Neon Demo" #Language: "English British Male" Language: en-gb, male Variable: full_name Variable: first_name Variable: last_name Variable: response Neon speak: "Hello human. My full name is Neon Gecko Inc; call me Neon. Lets get started." Execute: "what time is it" Execute: "what is the weather" Neon speak: "Please say your first and last name or say exit, or you can type your response" voice_input(full_name) Execute: "my name is {full_name}" Neon speak: "Thank you." #Execute: "tell me my full name" if profile(user.first_name): Execute: "tell me my first name" if profile(user.last_name): Execute: "tell me my last name" Neon speak: "Is that correct? Say yes, change first name, change last name or exit" voice_input(response) Case: {response} "yes" Exit "change first name" Neon speak: "Tell me your first name or say exit" voice_input(first_name) Execute: "neon my first name is {first_name}" Execute: "neon tell me my first name" "change last name" Neon speak: "Tell me your last name or say exit" voice_input(last_name) Execute: "neon my last name is {last_name}" Execute: "neon tell me my last name" Exit

Script: "WTP Demo" Language: en-au, female Synonym: "Demo WTP" Synonym: "WTP Demo" Variable: response Neon speak: "Say 1 or World Times for world times" "Say 2 or World Weather for world weather" "Say 3 or World Populations for world populations" voice_input(response) Case {response}: "1 or World Times" Neon speak: "Say A or Athens for Athens's time" "Say B or Bombay for Bombay's time" "Say S or Seattle for Seattle's time" voice_input(response) Case {response}: "A or Athens" Execute: "What time is it in Athens" "B or Bombay" Execute: "What time is it in Bombay" "S or Seattle" Execute: "What time is it in Seattle" "2 or World Weather" Neon speak: "Say A or Athens for the weather in Athens" "Say B or Bombay for the weather in Bombay" "Say S or Seattle for the weather in Seattle" voice_input(response) Case {response}: "A or Athens" Execute: "What is the weather in Athens" "B or Bombay" Execute: "What is the weather in Bombay" "S or Seattle" Execute: "What is the weather in Seattle" "3 or World Populations" Neon speak: "Say A or Athens for Athens's population" "Say B or Bombay for Bombay's population" "Say S or Seattle for Seattle's population" voice_input(response) Case {response}: "A or Athens" Execute: "What is the population of Athens" "B or Bombay" Execute: "What is the population of Bombay" "S or Seattle" Execute: "What is the population of Seattle" Exit

Script: "xyz" Neon speak: "Hello" Neon speak: "Thank you for running the xyz script. Would you like to hear a joke" Execute: "tell me a joke" Neon speak: "Here is the current time" Execute: "what is the time" Exit

Script Library Help Page

Updated 7/21/20

Custom Conversations

Summary

Create your own or use text script files shared by other users.

Requirements

No special required packages for this skill.

Description

Skill, which works using the custom text parsing implementation, provides the functionality to create, share, modify, and use any script files obtained from the shared library.

How to Use

Scripts update automatically when Neon is started; you can start a script by saying:

Neon run my <script name> skill file

If the script has any synonyms specified, you may also use a synonym to start the script.

If the script has any defined tags, you can start the script at the tag by saying:

Neon run my <script name> skill file at <tag name>

You may also update scripts:

Neon update my scripts

You can request an emailed copy of a script:

Neon email me my <script name> script

What are scripts?

Scripts are user-constructed text files that contain various Neon commands. Using a few simple keywords, described below in the detail, you can specify exactly what Neon should say, do, repeat, and answer; you can create new dialogs, routines, loops, and query lookups, while utilizing every skill, YAML variable, and other information that Neon knows.

For example:

Script: "Demo Hello World Input"
Variable: {input}: ""
Neon speak: "Hello World. Say anything or exit"
voice_input{input}
Neon speak: "you said {input}"
Exit

Scripts are easily sharable between other users via the Neongecko Scripts Library. You can submit your script there to share with all the other Neon users.

You can also find various demo scripts there if you need somewhere to start or something to reference.

Starting a Script File

Scripts must begin with a Script: line containing the script name and then any optional Variable, Claps, Language, and Synonym lines. After this, you can continue with any of the other script commands. It is recommended to include a Neon Speak statement to tell the user what they can do/how to proceed prior to requesting any user input.

Script: "Demo Weather Time Population"
Language: "en-au female"
Variable: {response}: ""
Synonym: "WTP"

Language

This sets the language Neon will use for script responses while the script is active. This will not affect a user's profile or responses they get from Neon outside of the script. The valid language codes are:

zh-zh, da-dk, nl-nl, en-au, en-gb, en-in, en-us, en-gb-wls, fr-fr, fr-ca, de-de, hi-in, is-is, it-it, ja-jp, ko-kr, nb-no, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, es-es, es-mx, es-us, sv-se, tr-tr, cy-gb, cmn

Any of the above language codes may also be used without the region code (i.e. "en" is equivalent to "en-us"). "male" or "female" may also be specified either before or after the language code; the default gender is "female".

Language: "en-us female"

Description

This is an optional short description of the script.

Author

This is an optional author credit.

Timeout

This is an optional parameter to handle situations where a user hasn't responded for a specified period of time. The first argument is the duration in seconds to wait for a response (max 3600). The second parameter is interpreted as a goto and can be a line number or tag.

Go to the named tag "example" after 10 seconds of inactivity:

Timeout: 10 example
...
@example
# Code here will be executed after 10 seconds of inactivity

Go to line 7 after 30 seconds of inactivity:

Timeout: 30 7
...
Neon speak: Are you still there?  # If this is line 7 of the script file, this is spoken after 30s of inactivity

Variable

A variety of parameters to be used later in the script. Can be preset or empty. All variables will be saved as a list with the most recent value at index 0 and previous values appended. table_scrape will build a dictionary of named links as options. List variables may occupy more than one line; subsequent lines should be indented from the Variable: line. Variables used for simple word substitutions will contain pairs of strings where each pair is separated by a comma. Variables used for conversational responses will contain multiple quoted string sets with each set separated by a comma.

Simple Variable declarations:

    Variable: {from_units} = ""
    Variable: {conversions} = weight, volume, length, time, currency
    Variable: {options} = table_scrape(https://www.neongecko.com/demos)

Word Substitutions:

Variable: input_sub = dont don't,
    cant can't,
    wont won't,
    recollect remember

Conversational Responses:

Variable: key_sub = "[sorry] for *" "Please don't apologize about *" "No need to apologize about *",
    "i remember when {1} said {2}" "Do I think of {1} or {2} often?",
    "*" "I don't understand. Please elaborate." " What do you mean by *?"

Synonym

Specifies a phrase that can be used to start this skill file. After the script is run the first time, the synonym will be added to the user's synonyms. After this, the synonym can be used to run the script. For example:

Case: "Run My TPW Skill File"  
Synonym: "T P W 2"

Claps

The number of claps that should be associated with starting the script (similar to Synonyms).

Claps: 2  

Script Keywords and Spacing

Neon scripts follow the Python convention of 4 spaces to indent subordinate lines. A line without a command will be considered a subordinate of the previous line that has one fewer indent; for example, all of the lines below after Neon speak: would be spoken:

Neon speak:
    "Say 1 or World Times for world times"
    "Say 2 or World Weather for world weather"
    "Say 3 or World Populations for world populations" 

There are multiple keywords available and new ones are added frequently. The current list, starting with the core example above:

Neon speak

Literal string to be spoken by Neon. A single line to speak can be on the same line as Neon speak:. If multiple lines are to be spoken, they should follow Neon speak: and be indented. SSML is supported in Neon speak and Name speak commands if they are supported by the selected TTS engine. Examples of ssml supported by Amazon Polly can be found here.

Neon speak: "Hello World. Say anything or exit"
Neon speak:
    "Say 1 or World Times for world times"
    "Say 2 or World Weather for world weather"
    "Say 3 or World Populations for world populations"

Name speak

Literal string to be spoken as a specified speaker. Name is required, gender and language may optionally be specified as comma-separated parameters. If one of gender or language are specified, the other will use the user's profile setting or script setting if available. SSML is supported in Neon speak and Name speak commands if they are supported by the selected TTS engine. Examples of ssml supported by Amazon Polly can be found here. SSML is supported in Neon speak and Name speak commands if they are supported by the selected TTS engine. Examples of ssml supported by Amazon Polly can be found here.

Name Speak: Nobody: "Or I can speak as someone else."
Name Speak: Slow Male, male: "<prosody volume="-2dB" rate="x-slow" pitch="x-low">I can be quiet, slow, and deep</prosody>"
Name Speak: English Male, male, en-us: "<prosody volume="-2dB" rate="x-slow" pitch="x-low">I can be quiet, slow, and deep</prosody>"

Reconvey

Neon plays back a user's original audio input (if available) and prints the transcription. The last value of the passed variable is used with the last audio_file available for that variable. No Text-To-Speech will be generated, so nothing will be played if there is no input audio to use.

Note: The variable named should not be enclosed in braces unless its value is the name of the variable to be spoken

voice_input(var_to_use)

...

Reconvey: var_to_use

Execute

String to be executed as if spoken by a user. A single line to execute can be on the same line as Execute:. If multiple lines are to be executed, they should follow Execute: and be indented. When a string is executed, Neon will wait several seconds for a response before continuing. Any commands will be executed as if a wake word was heard, so "Neon" is not required in front of any commands.

Execute: "What time is it in Athens"
Execute:
    "neon translate cherry to russian"
    "neon tell me my language setting
    "neon speak to me in english
    "neon speak to me in Russian and French
    "neon speak to me in english

Tag

Lines with @ as the first non-whitespace character will be indexed as Goto tag lines. A tag line should be one word and contain only a string label.

@test_tag

####Goto Command to go to the specified line or tag in the script. The argument to this command can be either a file line number (the line specified will be executed next) or a tag that is defined in the script (the line following the tag will be executed next). Tags may reference a line at any position in the file. When writing a script with Goto commands, avoid entering your script at case option lines and consider where variables are set to avoid using a variable before setting it (i.e. with voice_input.

Goto: test_tag
Goto: 5

Comments

Lines with # as the first non-whitespace character will not be executed. Comment lines are useful for annotating a script or removing problematic lines when troubleshooting. (ex. you remove a line and leave a comment for why the line is commented out). Block comments are also allowed where blocks start and end with """.

# Removed speak to troubleshoot voice_input
    # Neon speak:
    #     "Say your first name or exit" voice_input{first_name}
"""
    This is inside a block comment.
You can put in longer comment strings here, or surround a section of code
"""

voice_input

Specifies when a variable needs to be filled with user input. If an optional list of options is provided, the script will wait for user input to match one of those options, otherwise the next user input will be used. Once the variable has been assigned a value, the script will continue at the following line. Variables will preserve a history of previous values in a list. It is recommended that any voice_input follows a Neon speak: prompting the user to say something.

    Variable: {input}: ""
    Neon speak: "Hello World. Say anything or exit"
    voice_input{input}
    Neon speak: "you said {input}"
    Neon speak:
        "Say 1 or World Times for world times"
        "Say 2 or World Weather for world weather"
        "Say 3 or World Populations for world populations"
    voice_input{response}
    Case {response}:
Variable: {selected}: ""
Variable: {conversions}: weight, volume, length, time, currency
Neon speak: "Say convert select_one{conversions} to convert or exit when done"
voice_input{selected,conversions}

If/Else

If statements can be used to evaluate variable values. If a comparator is not given, the variable will be evaluated as a boolean, where values of 0, false, none, null, no, and "" are false and any other value is true. Valid numeric comparators are: > ,<, >=, <=, ==, !=. Valid string/list comparators are: CONTAINS, IN, STARTSWITH, ENDSWITH and their inverses when prefixed with ! (i.e. !CONTAINS). Variables may be compared to other variables or to static values. For string/list comparators, the first argument will be treated as a string, and the second will be treated as a list of strings. CONTAINS returns true if the left value (string) contains any element the right value (list). IN returns true if an exact match of the left value (string) exists in the right value (list). STARTSWITH returns true if the left value (string) begins with any element in the right value (list). ENDSWITH returns true if the left value (string) ends with any element in the right value (list). Strings passed to numeric comparisons follow Python3 rules.

Variable: {test}: "False"

if {test}:
    Neon speak: "True"
else:
    Neon speak: "False"
Neon speak: "Say 'continue' to continue"
voice_input{test}

if {test} == "continue":
    Neon speak: "Okay, lets continue"
else:
    Neon speak: "Okay, exiting."
Neon speak: "Say {conditional} to continue"
voice_input(test)

if {test} != {conditional}:
    Neon speak: "Not matched, exiting"
    Exit
else:
    Neon speak: "Okay, lets continue."
if {input} CONTAINS "help":
    # This block is executed if input contains the word 'help'
if {input} CONTAINS help, assist, what:
    # This block is executed if input contains any of the words: "help", "assist", "what"

Case

Case statements can be used to execute different commands based on some variable value. Case statements often follow a voice_input to assign a variable value, but may also use a variable that has already been defined. Case options should follow the Case: line and be indented from that line by one. Commands to run if the case option is satisfied should be indented from that case option. A Case: will execute the first matched option and then continue at the next line following the end of the case; if no option is matched, the script will go back to the voice_input line immediately before the case. Case options containing "or" will compare the Case variable against the string on either side of "or".

Neon speak:
    "Say A or Athens for Athens's time"
    "Say B or Bombay for Bombay's time"
    "Say S or Seattle for Seattle's time"
voice_input{response}
Case {response}:
    "A or Athens"
        Execute: "What time is it in Athens"
    "B or Bombay"
        Execute: "What time is it in Bombay"
    "S or Seattle"
        Execute: "What time is it in Seattle"
# Script continues here
Exit

Python

Any line of python 3 readable code will be executed in the order it was specified in the script file. These lines will execute and then continue to the next line of the script; you may assign the output of a valid Python operation to a script variable to use later in your script. The time module is available in addition to any builtin methods.

Currently, the following math operations are supported: +, -, /, *, % (modulus), ** (power), ln(x), log(x) (log base 10), sqrt(x), and common trigonometry functions (sin, cos, tan, sinh, cosh, tanh, asin, acos, atan). The constants e and pi are also available.

Python: time.sleep(5)
Python:
    hypotenuse = sqrt({side_1}**2 + {side_2}**2)

Exit

Exit command to finish the script. Could be positioned anywhere in the document. Note: your script should always exit somewhere, this is often simply on the last line and indented by 0.

Exit  

Loop

Loops are defined by a starting line and an ending line with optional conditions. A loop begins where LOOP is declared with a name and ends where a LOOP END or LOOP UNTIL line is reached. A loop can always be exited when the user says "exit", otherwise the loop will run until the UNTIL condition is met or indefinitely if no UNTIL condition is met. Provides familiar functionality as loops. Can be nested and combined with other statements. Positioned at the beginnings and end of a Case statement. A loop is started with the keyword LOOP followed by a name and terminated by name with the keyword END as noted below.

No end condition defined, this loop will continue until the user says "exit".

LOOP WW
    Neon speak:
        "Say A or Athens for the weather in Athens"
        "Say B or Bombay for the weather in Bombay"
        "Say S or Seattle for the weather in Seattle"
        "Say exit to exit"
    voice_input{location}
    Case {location}:
        "A or Athens"
            Execute: "What is the weather in Athens"
            Neon speak: "about to repeat A"
        ...
     Neon speak:
         "End of loop WW."
LOOP WW END

A loop until a specified variable has been filled in with the defined values:

LOOP WW
    Neon speak:
        "Say A or Athens for the weather in Athens"
        "Say B or Bombay for the weather in Bombay"
        "Say S or Seattle for the weather in Seattle"
        "Say exit to exit"
    voice_input{location}
    Case {location}:
        "A or Athens"
            Execute: "What is the weather in Athens"
            Neon speak: "about to repeat A"
        ...
     Neon speak:
         "End of loop WW."
LOOP WW UNTIL location == "b"

Set

You may set variables equal to other variable values or static values with the keyword Set anywhere in a script. This can be useful to save a variable value before modifying the variable

    Set: user_speech = {input}

Email

You may draft and send an email to the user running a script if their email is available. The title may be a quoted literal or a variable reference. The body must be a variable. Variables should not be placed inside braces.

Email: "My Email Title", variable_body

Run

You may execute a different script from within your script. Users will be notified when the requested script is started or if a requested script isn't available. Upon exit from the script called via Run, the original script will resume at the following line and continue normally. Variables from the calling script will be available to the called script if that script does not have a variable of the same name defined or the variable is defined with no value. When the original script is resumed, any defined variables are restored to the same state they were in prior to the Run command.

Run: demo guess number

sub_values

Accepts a variable string to modify and a list variable containing substitution pairs. Any word matched to the first word of a substitution pair will be replaced with the second word of that pair in the passed variable.

Variable: input_sub = dont don't,
    cant can't,
    wont won't,
    recollect remember
...
sub_values{input, input_sub}

sub_key

sub_key is a simplified method for matching a user's input to a pattern and then generating a response associated with that pattern. sub_key accepts a string variable to match and a list variable containing strings to match and associated responses. Wildcards (*) and new variables ({var_1}) may be used in the strings to match and the associated responses to include parts of the input in the response. Multiple wildcards will be evaluated positionally (i.e. the first wildcard in the input will be used as the first wildcard in the output). sub_key executes such that the first matched response in the associated responses list will be used; this allows a catch-all wildcard to be used at the end of the list to handle any input that doesn't match a specified pattern. Bracketed strings ([string]) reference a list variable so that any word in the variable is accepted as a match. Note: wildcard variables are only available for the current substitution; named variables are available for use later in the script until overwritten.

Variable: sorry = sorry, i apologize
Variable: key_sub = "[sorry] for *" "Please don't apologize about *" "No need to apologize about *",
    "i remember when {1} said {2}" "Do I think of {1} or {2} often?",
    "*" "I don't understand. Please elaborate." " What do you mean by *?"
...
sub_key{input, key_sub}

In-text options (Used for variable substitutions):

select_one

Specifies that the value will have to be filled in by user's choice from the provided list of items before proceeding. Used in Neon speak statements to speak the available options for a variable.

Variable: {conversions}: weight, volume, length, time, currency  
Neon speak:  
"Say convert select_one{conversions} to convert or exit when done"

table_scrape

Uses beautiful soup to give back a readable and searchable dictionary of text/link pair of any HTML table element on a provided web page.

Variable: {options}: table_scrape(https://www.neongecko.com/demos)

random

Returns random elements of the given list variable. If used to set a variable, one value will be assigned; in a Neon speak, 2-3 examples will be provided and spoken.

Variable: {numbers}: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Variable: {neon_num}: random{numbers}
    Variable: {options}: table_scrape(https://www.neongecko.com/demos)  
    Variable: {chosen}: ""  
    Neon speak:  
        "Please tell me what kind of help video you would like to see. You can say things like random{options}"

closest

Returns the closest element of a list to the specified variable (generally used in combination with table scrape). Optimized for string processing.

Execute: "av play closest{chosen,options}"

profile

Lookup a value from a user profile to use in a speak or execute command.

profile{user.email}

How to Use

Scripts can be downloaded from Neongecko's library or drafted and added to the script_txt folder in the skill directory. The demo skill files (found in the library at neongecko.net) and descriptions above provide a summary and examples of the available functionality and formatting requirements.

Contact Support

Use the link or submit an issue on GitHub

Credits

reginaneon neongeckocom

Home

Try running a script on the Neon Nano. 

After the initial welcome script ends  (or you say or type "exit"), turn on the microphone and try a simple script. To do this say or type "run my Eliza script" .

What are Scripts?

Neon scripting enables professional developers and end-users to create unique solution for homes and business customers. Scripts perform both simple or complex conversational AI interactions, listening to users, executing commands and audibly responding to user.

For end-user, talking with a Neon scripts is like talking to any modern conversational digital assistant or smart speaker (like Alexa or Siri).

For conversation AI developers, scripts provide feature demonstrations, customizable audible website navigation, automated connection to online resources, and more. 

Conversational Artificial Intelligence Scripts

Scripts are easy-to-read programs that can contain Neon commands. Using a few simple keywords, described below in the detail, users specify exactly what Neon should say, do, repeat, and answer. Users create new dialogues, routines, loops, and can even query look ups, utilizing every skill, credential, and other information that Neon knows. 

Scripts can be shared easily between users via the Neon Script Library, found on neongecko.net/script-libraryUsers can publish their own scripts , or download someone else's. 

Start using conversational AI scripting today to build your own scripts for personas, navigator, greeter, personas, or anything you can dream up! 

Script Upload

Script

Please provide the name of the script here.

Please provide a short description of the script.

Please enter the text of the script here.

Author

Name