Add error handling for conversation, add start sound speech intent

This commit is contained in:
Nadine Ganz 2025-09-05 15:56:44 +02:00
parent 2cce77e5ef
commit 3958dba5ba
3 changed files with 5 additions and 3 deletions

View File

@ -766,7 +766,7 @@ Tree("26_Castello_Castelli_di_Bellinzona_Castelli_Bot_Interaktion") {
BTC.Run("MediaPlayer.VIDEOS.CastelliBotInterak_F1")
BTC.Run("MediaPlayer.VIDEOS.CastelliBotInterak_FIdle02")
BTC.SetSpeechRecognitionLanguage("de-DE") // muss geloescht werden am Ende
BTC.SetSpeechRecognitionLanguage("de-DE") // TODO: muss geloescht werden am Ende
BTC.StartChatbotConversation()
BTC.ChatbotConversationEnded()
BTC.SpeechOutputEnded()

View File

@ -800,6 +800,7 @@ public class BTC : MonoBehaviour {
// Chatbot Conversation Events
_speechMng.ConversationService.OnConversationInitiatedEvent += ChatbotConversationStartetEventHandler;
_speechMng.ConversationService.OnConversationEndedEvent += ChatbotConversationEndedEventHandler;
_speechMng.ConversationService.OnConversationErrorEvent += SpeechErrorEventHandler;
// Error Event
_speechMng.OnViaggioAIErrorEvent += SpeechErrorEventHandler;

View File

@ -216,6 +216,7 @@ public class SpeechRecognitionService : MonoBehaviour
this.SpeechRecognitionState = ESpeechRecognitionState.Listening;
}
vaim.PlayAudioIfEnabled(this.startedListeningClip);
recognizer.SpeechStartDetected += this.speechRecognizer_SpeechStartDetected;
recognizer.Recognizing += this.speechRecognizer_Recognizing;