Add start of dialogue for demo

dev
Nadine Ganz 2024-11-20 21:02:10 +01:00
parent 3107aceb63
commit 3742a69a40
6 changed files with 201853 additions and 130689 deletions

View File

@ -4,127 +4,148 @@
//BTC.SetSpeechRecognitionLanguage("it-IT") //BTC.SetSpeechRecognitionLanguage("it-IT")
BTC.Wait(5) BTC.Wait(5)
BTC.SynthesizeText("Gib mir Bescheid, sobald du bereit bist.")
BTC.SpeechOutputEnded()
BTC.SetBool("startdialogue", false) BTC.SetBool("startdialogue", false)
BTC.AddPossbileSpeechIntent("Kueche.start_dialog.1")
Composite(Race) { Decorator(Repeat) {
Decorator(Repeat) { Composite(Race) {
Composite(Sequence) { Composite(Sequence) {
BTC.Wait(15) BTC.CompareBool("startdialogue", false)
// Race mit Sprache und Wait
BTC.SynthesizeText("Gib mir Bescheid, sobald du bereit bist.") BTC.SynthesizeText("Gib mir Bescheid, sobald du bereit bist.")
// BTC.SynthesizeText("Dimmi quando possiamo cominciare.")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
BTC.StartSpeechIntentRecognition()
Composite(Race) {
Composite(Sequence) {
BTC.Wait(10)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
}
Composite(Sequence) {
BTC.UserStartedSpeechInput()
BTC.SpeechIntentRecognized()
// Intent erkannt
BTC.SetBool("startdialogue")
}
}
}
Composite(Sequence) {
BTC.CompareBool("startdialogue")
BTC.ClearPossbileSpeechIntents()
BTC.SynthesizeText("Wir beide werden jetzt ein feines Risotto nach dem Rezept meiner Nonna kochen. Kochst du denn gerne?")
//BTC.SynthesizeText("Noi due adesso facciamo un buon risotto basato sulla ricetta di mia nonna. Ti piace cucinare?")
BTC.SpeechOutputEnded()
// Frage beantworten
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4")
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Sequence) {
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.6")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(5)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
}
} }
} }
BTC.CompareBool("startdialogue", true)
} }
BTC.SynthesizeText("Wir beide werden jetzt ein feines Risotto nach dem Rezept meiner Nonna kochen. Kochst du denn gerne?")
//BTC.SynthesizeText("Noi due adesso facciamo un buon risotto basato sulla ricetta di mia nonna. Ti piace cucinare?")
BTC.SpeechOutputEnded()
// Frage beantworten
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.4")
BTC.AddPossbileSpeechIntent("Kueche.alles_gefunden.6")
BTC.StartSpeechIntentRecognition()
Composite(Race) {
// -- Race 1: User sagt etwas
Composite(Sequence) {
BTC.UserStartedSpeechInput()
Composite(Selector) {
// -- Selector 1: Intent erkannt
Composite(Sequence) {
BTC.SpeechIntentRecognized()
// Intent erkannt
Composite(Race) {
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.4")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
BTC.CompareIntentID("Kueche.alles_gefunden.6")
BTC.ClearPossbileSpeechIntents()
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
// -- Selector 2: Intent nicht erkannt
Composite(Sequence) {
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
}
}
// -- Race 2: User sagt nichts
Composite(Sequence) {
BTC.Wait(10)
BTC.CompareUserSpeechInputStarted(false)
BTC.AbortSpeechEventListener()
BTC.StopSpeechIntentRecognition()
BTC.ClearPossbileSpeechIntents()
// Fallback Button
Composite(Marathon) {
BTC.Set("TextMeshPro.HANDMENU.Option1Button", "text", "Ja")
BTC.Show("GO.HANDMENU.Option1Button")
BTC.Set("TextMeshPro.HANDMENU.Option2Button", "text", "Nein")
BTC.Show("GO.HANDMENU.Option2Button")
}
Composite(Race) {
Composite(Sequence) {
// Ja
BTC.Run("NamedEventTrigger.HANDMENU.Option1Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option2Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Interesse_Kochen")
}
Composite(Sequence) {
// Nein
BTC.Run("NamedEventTrigger.HANDMENU.Option2Button")
BTC.AbortEventListener("NamedEventTrigger.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option1Button")
BTC.Hide("GO.HANDMENU.Option2Button")
RunTree("32_Grotto_Kueche_Desinteresse_Kochen")
}
}
}
}
} }
} }
@ -268,7 +289,7 @@ Tree("32_Grotto_Kueche_Desinteresse_Kochen") {
Tree("32_Grotto_Kueche_Interaktion") { Tree("32_Grotto_Kueche_Interaktion") {
Composite(Sequence) { Composite(Sequence) {
BTC.SynthesizeText("Gut, dann fangen wir jetzt mit dem Risotto an. Gebe bitte die Pilze in den Topf.") BTC.SynthesizeText("Gut, dann fangen wir jetzt mit dem Risotto an. Gebe bitte die Pilze in den Topf.")
//BTC.SynthesizeText("Bene, allora cominciamo con il risotto. Versa le cipolle e il riso nella pentola.") //BTC.SynthesizeText("Bene, allora cominciamo con il risotto. Metti i funghi nella pentola.")
BTC.SpeechOutputEnded() BTC.SpeechOutputEnded()
BTC.Enable("NamedOutline.INTERACTABLES.Teller") BTC.Enable("NamedOutline.INTERACTABLES.Teller")
@ -293,6 +314,8 @@ Tree("32_Grotto_Kueche_Interaktion") {
BTC.Disable("NamedOutline.INTERACTABLES.Teller") BTC.Disable("NamedOutline.INTERACTABLES.Teller")
BTC.Wait(300) BTC.Wait(300)
BTC.SetBool("startdialogue", false)
BTC.AddPossbileSpeechIntent("Kueche.start_dialog.1")
} }
} }

View File

@ -1 +1 @@
2024-11-19T13:59:10.1955850Z 2024-11-20T19:51:04.3760380Z

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,14 @@
{ {
"intents": [ "intents": [
{
"intentID": "Kueche.start_dialog.1",
"intentSentences": [
"Ja, ich bin bereit.",
"Ich bin bereit.",
"Es kann losgehen.",
"Wir k\u00f6nnen starten."
]
},
{ {
"intentID": "Kueche.alles_gefunden.4", "intentID": "Kueche.alles_gefunden.4",
"intentSentences": [ "intentSentences": [

View File

@ -1,10 +1,20 @@
{ {
"intents": [ "intents": [
{
"intentID": "Kueche.start_dialog.1",
"intentSentences": [
"Sono pronto.",
"Sono pronta.",
"S\u00ec, sono pronto.",
"S\u00ec, sono pronta.",
"Possiamo cominciare."
]
},
{ {
"intentID": "Kueche.alles_gefunden.4", "intentID": "Kueche.alles_gefunden.4",
"intentSentences": [ "intentSentences": [
"Sì.", "S\u00ec.",
"Sì, mi piace cucinare.", "S\u00ec, mi piace cucinare.",
"Mi piace molto cucinare.", "Mi piace molto cucinare.",
"Cucino molto volentieri.", "Cucino molto volentieri.",
"Adoro cucinare.", "Adoro cucinare.",
@ -32,7 +42,7 @@
{ {
"intentID": "Kueche.Kochen_Anzahl.2", "intentID": "Kueche.Kochen_Anzahl.2",
"intentSentences": [ "intentSentences": [
"Sì, spesso.", "S\u00ec, spesso.",
"Molto spesso.", "Molto spesso.",
"Quasi ogni giorno.", "Quasi ogni giorno.",
"Tutti i giorni." "Tutti i giorni."

View File

@ -140,6 +140,9 @@ PlayerSettings:
bundleVersion: 0.1 bundleVersion: 0.1
preloadedAssets: preloadedAssets:
- {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2} - {fileID: 11400000, guid: be340e3c48769439d8d18a5a2bccd498, type: 2}
- {fileID: 11400000, guid: bfa1182bd221b4ca89619141f66f1260, type: 2}
- {fileID: -8196854396901781169, guid: 1a4c68ca72a83449f938d669337cb305, type: 2}
- {fileID: -64324148185763206, guid: a9a6963505ddf7f4d886008c6dc86122, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1