Implement Ablauf Baeckerei
This commit is contained in:
parent
3dafa55b8f
commit
74932b5828
@ -1,5 +1,550 @@
|
|||||||
Tree("Root") {
|
Tree("Root") {
|
||||||
RunTree("22_Geschaeft_Hide")
|
Composite(Sequence) {
|
||||||
|
BTC.InitializeSpeechManager()
|
||||||
|
BTC.SetSpeechRecognitionLanguage("it-IT")
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Error in Speech Service: Cancel BTC Trees
|
||||||
|
BTC.SpeechErrorOccured()
|
||||||
|
BTC.SetBool("error")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
RunTree("22_Geschaeft_Story_A_Picknicken_Intro")
|
||||||
|
//RunTree("22_Geschaeft_Baeckerei_Outro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareBool("error")
|
||||||
|
// Error Handling
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
|
||||||
|
BTC.Show("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Restart")
|
||||||
|
BTC.Show("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Show("GO.HANDMENU.Home")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechOptions")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Tree("22_Geschaeft_Story_A_Picknicken_Intro") {
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SynthesizeText("Qui trovi i migliori panini di tutta Bellinzona. Mhmmm, adoro fare i picnic!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Anche le piadine di Pietro sono deliziose. Mhmm, cosa prendo? Tu ordina pure, io devo ancora pensarci un momento.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Ciao Francesca! Come posso servirvi?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Story_A_Picknicken.Intro.3")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RunTree("22_Geschaeft_Story_A_Picknicken_Mitnehmen")
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Nachfrage Bestellung ---
|
||||||
|
BTC.SynthesizeText("Sa già cosa prendere?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Story_A_Picknicken.Nachfrage_Bestellung.2")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RunTree("22_Geschaeft_Story_A_Picknicken_Mitnehmen")
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Bestellung Begleiter Beide ---
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Dai, se vuoi ordino io per tutt’e due, va bene?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Vorrei due panini al formaggio, due piadine alla caprese e due gazzose al mandarino.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Con piacere. Da portare via o da mangiare qui?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Da portare via, per favore.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Fanno 42 franchi. Paghi col cellulare? Per favore, avvicinalo al dispositivo.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Grazie mille! Divertitevi!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Grazie, Pietro. A presto.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
RunTree("22_Geschaeft_Baeckerei_Outro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // erste Race user sagt nichts
|
||||||
|
} // erste grosse race
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Tree("22_Geschaeft_Story_A_Picknicken_Mitnehmen") {
|
||||||
|
// --- Story A Picknicken - Mitnehmen ---
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SynthesizeText("Volentieri. Da portare via o da mangiare qui?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Story_A_Picknicken.Mitnehmen.2")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Allora le incarto tutto.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Bezahlen einzeln ---
|
||||||
|
BTC.SynthesizeText("Fanno 21 franchi. Per favore, paghi avvicinando il telefono al dispositivo.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
// ToDo: Bezahlung mit Handy User
|
||||||
|
Composite(Race) {
|
||||||
|
// ToDo: Collide handy mit Payment device
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
// Collide Aktion abbrechen?
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Nachfrage Bezahlung ---
|
||||||
|
BTC.SynthesizeText("Per favore, avvicini il cellulare qui, al dispositivo.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// ToDo: Collide handy mit Payment device
|
||||||
|
BTC.GetKeyDown("Return")
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
// Collide aktion abbrechen?
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ok, pago io per te, puoi darmi i soldi più tardi.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Dank Einkauf ---
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Tante grazie! Divertitevi!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Story_A_Picknicken.Dank_Einkauf.2")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Story A Picknicken - Bestellung Begleiter ---
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ecco, finalmente so cosa prendere. Vorrei un panino al formaggio e una piadina con prosciutto di Parma, per favore.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Metto tutto nello stesso sacchetto?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Si si, va bene.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("E qualcosa da bere?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ah sì, una gazzosa al mandarino, per favore.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Allora, sono 25 franchi.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Pago col cellulare.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Per piacere paga attraverso il dispositivo.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Grazie mille!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Anche a te Pietro, a presto!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
RunTree("22_Geschaeft_Baeckerei_Outro")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Tree("22_Geschaeft_Baeckerei_Outro") {
|
||||||
|
// --- Baeckerei Outro ---
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Run("StudioEventEmitter.STATIC.TuerOeffnenSound")
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ehi, Enrico, che coincidenza!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Ciao Francesca, ti ho visto da fuori. Che piacere vederti!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Vedo che avete grandi progetti per oggi!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ti presento qualcuno, è di passaggio e viene dalla Svizzera tedesca.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Ciao, piacere di conoscerti. Sono Enrico. Come ti chiami?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Baeckerei_Outro.6")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Stiamo andando a fare un picnic. Perché non vieni con noi?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Mi piacerebbe, ma sto andando ad allenarmi.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Ah, ok, io tornerò la settimana prossima.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Be’, allora divertitevi! Ehi, è stato bello vederti!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Anche per me, ciao Enrico!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SynthesizeText("È un mio amico. Ci siamo conosciuti frequentando il gruppo di arrampicata. Davvero un grande amico! Dai, ora cerchiamo un bel posticino per rilassarci un po’. Andiamo a piedi o preferisci andare in monopattino? Non è lontano, sai. Da qui, a piedi impieghiamo una ventina di minuti.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.AddPossbileSpeechIntent("Baeckerei_Outro.16")
|
||||||
|
BTC.AddPossbileSpeechIntent("Baeckerei_Outro.18")
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
// -- Race 1: User sagt etwas
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
|
||||||
|
Composite(Selector) {
|
||||||
|
// -- Selector 1: Intent erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareIntentID("Baeckerei_Outro.16")
|
||||||
|
BTC.SetBool("ChoosedWalking")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareIntentID("Baeckerei_Outro.18")
|
||||||
|
BTC.SetBool("ChoosedDriving")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Selector 2: Intent nicht erkannt
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.SynthesizeText("Allora, in monopattino o a piedi?")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
BTC.StartSpeechIntentRecognition()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.UserStartedSpeechInput()
|
||||||
|
BTC.SpeechIntentRecognized()
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareIntentID("Baeckerei_Outro.16")
|
||||||
|
BTC.SetBool("ChoosedWalking")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.CompareIntentID("Baeckerei_Outro.18")
|
||||||
|
BTC.SetBool("ChoosedDriving")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
|
||||||
|
BTC.CompareUserSpeechInputStarted(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Selector 3: Fallback Button
|
||||||
|
Composite(Sequence) {
|
||||||
|
Composite(Marathon) {
|
||||||
|
BTC.Show("GO.HANDMENU.SpeechOptions")
|
||||||
|
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "A piedi")
|
||||||
|
BTC.Show("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Monopattino")
|
||||||
|
BTC.Show("GO.HANDMENU.Option2Button")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Zu Fuss
|
||||||
|
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||||
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Show("GO.HANDMENU.Home")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechOptions")
|
||||||
|
BTC.SetBool("ChoosedWalking")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Scooter
|
||||||
|
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
|
||||||
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Show("GO.HANDMENU.Home")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechOptions")
|
||||||
|
BTC.SetBool("ChoosedDriving")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -- Race 2: User sagt nichts
|
||||||
|
Composite(Sequence) {
|
||||||
|
BTC.Wait(5)
|
||||||
|
BTC.CompareUserSpeechInputStarted(false)
|
||||||
|
BTC.AbortSpeechEventListener()
|
||||||
|
BTC.StopSpeechIntentRecognition()
|
||||||
|
BTC.ClearPossbileSpeechIntents()
|
||||||
|
|
||||||
|
Composite(Marathon) {
|
||||||
|
BTC.Show("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "A piedi")
|
||||||
|
BTC.Show("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Monopattino")
|
||||||
|
BTC.Show("GO.HANDMENU.Option2Button")
|
||||||
|
}
|
||||||
|
|
||||||
|
Composite(Race) {
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Zu Fuss
|
||||||
|
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
|
||||||
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Show("GO.HANDMENU.Home")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechOptions")
|
||||||
|
BTC.SetBool("ChoosedWalking")
|
||||||
|
}
|
||||||
|
Composite(Sequence) {
|
||||||
|
// Scooter
|
||||||
|
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
|
||||||
|
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option1Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.Option2Button")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechButton")
|
||||||
|
BTC.Show("GO.HANDMENU.Home")
|
||||||
|
BTC.Hide("GO.HANDMENU.SpeechOptions")
|
||||||
|
BTC.SetBool("ChoosedDriving")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BTC.SynthesizeText("Allora andiamo! Ciao Pietro.")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Hey Francesca, non dimenticare il vostro pranzo!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-FabiolaNeural")
|
||||||
|
BTC.SynthesizeText("Uh, grazie mille!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
BTC.SetVoiceName("it-IT-GiuseppeMultilingualNeural")
|
||||||
|
BTC.SynthesizeText("Ciao Francesca, divertitevi!")
|
||||||
|
BTC.SpeechOutputEnded()
|
||||||
|
|
||||||
|
RunTree("22_Geschaeft_Hide")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Tree("22_Geschaeft_Hide") {
|
Tree("22_Geschaeft_Hide") {
|
||||||
@ -9,12 +554,12 @@ Tree("22_Geschaeft_Hide") {
|
|||||||
Composite(Race) {
|
Composite(Race) {
|
||||||
Composite(Sequence) {
|
Composite(Sequence) {
|
||||||
// Go to scene 2.4 Slideshow
|
// Go to scene 2.4 Slideshow
|
||||||
BTC.GetKeyDown("Return")
|
BTC.CompareBool("ChoosedWalking")
|
||||||
BTC.Run("LoadScene.NEXT.24Slideshow")
|
BTC.Run("LoadScene.NEXT.24Slideshow")
|
||||||
}
|
}
|
||||||
Composite(Sequence) {
|
Composite(Sequence) {
|
||||||
// Go to scene 2.5 Slideshow
|
// Go to scene 2.5 Slideshow
|
||||||
BTC.GetKeyDown("Backspace")
|
BTC.CompareBool("ChoosedDriving")
|
||||||
BTC.Run("LoadScene.NEXT.25Slideshow")
|
BTC.Run("LoadScene.NEXT.25Slideshow")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -288,6 +288,160 @@
|
|||||||
"S\u00ec, mi \u00e8 piaciuto molto cucinare!",
|
"S\u00ec, mi \u00e8 piaciuto molto cucinare!",
|
||||||
"S\u00ec, \u00e8 stato divertente."
|
"S\u00ec, \u00e8 stato divertente."
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Story_A_Picknicken.Intro.3",
|
||||||
|
"intentSentences": [
|
||||||
|
"Vorrei xy."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Story_A_Picknicken.Mitnehmen.2",
|
||||||
|
"intentSentences": [
|
||||||
|
"Da portare via, grazie."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Story_A_Picknicken.Nachfrage_Bestellung.2",
|
||||||
|
"intentSentences": [
|
||||||
|
"Vorrei xy."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Story_A_Picknicken.Dank_Einkauf.2",
|
||||||
|
"intentSentences": [
|
||||||
|
"Grazie, altrettanto. Arrivederci."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Baeckerei_Outro.6",
|
||||||
|
"intentSentences": [
|
||||||
|
"Ciao, sono xy."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Baeckerei_Outro.16",
|
||||||
|
"intentSentences": [
|
||||||
|
"Ma certo, andiamo a piedi.",
|
||||||
|
"A piedi.",
|
||||||
|
"Andiamo a piedi."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Baeckerei_Outro.18",
|
||||||
|
"intentSentences": [
|
||||||
|
"Preferirei prendere un monopattino.",
|
||||||
|
"Con il monopattino.",
|
||||||
|
"In monopattino."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Baeckerei_Outro..23",
|
||||||
|
"intentSentences": [
|
||||||
|
"Andiamo a piedi (oder nur: A piedi),"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Baeckerei_Outro..24",
|
||||||
|
"intentSentences": [
|
||||||
|
"Preferirei prendere un monopattino. (oder nur: Con il monopattino / In monopattino)."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.2",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.6",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.7",
|
||||||
|
"intentSentences": [
|
||||||
|
"No."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.11",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec (oder: Certamente / tanto / molto)."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.12",
|
||||||
|
"intentSentences": [
|
||||||
|
"No."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.16",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec (o volentieri)."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Intro.18",
|
||||||
|
"intentSentences": [
|
||||||
|
"No."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli.2",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli.7",
|
||||||
|
"intentSentences": [
|
||||||
|
"No."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli.9",
|
||||||
|
"intentSentences": [
|
||||||
|
"Per proteggere la citt\u00e0 dagli aggressori.(o un'altra risposta)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Chatbot_Burgen.5",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec, certo."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Chatbot_Burgen.7",
|
||||||
|
"intentSentences": [
|
||||||
|
"No, non mi interessa"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Chatbot_Burgen.9",
|
||||||
|
"intentSentences": [
|
||||||
|
"(Non c'\u00e8 risposta entro 5 secondi)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli_Bot.4",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec, con piacere."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli_Bot.6",
|
||||||
|
"intentSentences": [
|
||||||
|
"No, grazie."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"intentID": "Castelli_di_Bellinzona.Geschichte_Castelli_weitererzaehlen.16",
|
||||||
|
"intentSentences": [
|
||||||
|
"S\u00ec."
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user