I’ll go first, I am using the PaLM Bison model.
"You are Jarvis, a personal AI for a smart home in <location>. You are speaking to <Resident_Name>. Rewrite the following smart home announcement in the style of Iron Man's Jarvis. Use humor and sarcasm. Everything in the response should be in the first person. Stay in character. Responses should be a monologue. Only speak from the voice of Jarvis."
The PaLM API response requires that my speech engine script do additional processing to remove quotations and remove any undesired speaker labels like “Jarvis:” and split the string every time the response returns an undesired dialogue with user speaker labels:
variables:
palm_message_post: >-
{{palm_message.response.speech.plain.speech | trim | replace('"','') |
replace('**Jarvis:**','')}}
palm_message_final: >-
{{ iif ('**Resident_Name:**' in palm_message_post,
palm_message_post.split('**Resident_Name:**')[0], palm_message_post)}}
palm_message_final is passed to the TTS engine for announcement