Update speech package, rename button handmenu
This commit is contained in:
parent
3e10e2ace2
commit
ffcc78bdad
@ -6413,7 +6413,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "Level w\xE4hlen\r"
|
||||
m_text: "Szene w\xE4hlen\r"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 0d97ed6259f90444b8da67a4e5872245, type: 2}
|
||||
m_sharedMaterial: {fileID: -2574710329927910322, guid: 0d97ed6259f90444b8da67a4e5872245, type: 2}
|
||||
|
@ -2267,7 +2267,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &187118496494279981
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2676,7 +2676,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: v. 2024.09.1601
|
||||
m_text: v. 2025.09.1601
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
|
@ -126,13 +126,8 @@ public class ConversationService : MonoBehaviour
|
||||
|
||||
#region Events
|
||||
|
||||
private async void subscribeToEvents()
|
||||
{
|
||||
while (vaim == null)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Delay(10);
|
||||
}
|
||||
|
||||
private void subscribeToEvents()
|
||||
{
|
||||
vaim.SpeechRecognitionService.OnPartialTranscriptionChangedEvent += this.onPartialTranscriptionChanged;
|
||||
vaim.SpeechRecognitionService.OnFullTranscriptionChangedEvent += this.onFullTranscriptionChangedEvent;
|
||||
|
||||
@ -241,6 +236,7 @@ public class ConversationService : MonoBehaviour
|
||||
public async void StartConversation(string _languageCode, string _instructions, string _context, int _maxRoundtrips, float _maxSilenceBeforeTimeOut, string _outroText)
|
||||
{
|
||||
this.logIfInDebugMode($"Starting new conversation");
|
||||
ViaggioAIManager.Instance.soundEffectsEnabled = false;
|
||||
|
||||
this.languageCode = _languageCode;
|
||||
this.instructions = _instructions;
|
||||
@ -265,7 +261,8 @@ public class ConversationService : MonoBehaviour
|
||||
vaim.SpeechRecognitionService.StopListening();
|
||||
this.openAIServices_Conversation.Stop();
|
||||
|
||||
this.ConversationState = EConversationState.NotStarted;
|
||||
this.ConversationState = EConversationState.NotStarted;
|
||||
ViaggioAIManager.Instance.soundEffectsEnabled = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -362,13 +359,13 @@ public class ConversationService : MonoBehaviour
|
||||
{
|
||||
this.logIfInDebugMode("Stopping conversation");
|
||||
|
||||
this.OnConversationEndedEvent?.Invoke(this, $"Conversation stopped");
|
||||
|
||||
if (timeOut)
|
||||
{
|
||||
vaim.SpeechSynthesizerService.Synthesize(this.outroText, this.languageCode);
|
||||
this.OnConversationEndedEvent?.Invoke(this, $"Conversation stopped");
|
||||
|
||||
if (timeOut)
|
||||
{
|
||||
vaim.SpeechSynthesizerService.Synthesize(this.outroText, this.languageCode);
|
||||
}
|
||||
|
||||
|
||||
this.ConversationState = EConversationState.Ended;
|
||||
|
||||
vaim.StopConversation();
|
||||
|
18
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/IntentRecognitionService.cs
Normal file → Executable file
18
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/IntentRecognitionService.cs
Normal file → Executable file
@ -101,13 +101,8 @@ public class IntentRecognitionService : MonoBehaviour
|
||||
|
||||
#region Private Events
|
||||
|
||||
private async void subscribeToEvents()
|
||||
{
|
||||
while (vaim == null)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Delay(10);
|
||||
}
|
||||
|
||||
private void subscribeToEvents()
|
||||
{
|
||||
vaim.OnViaggioAIStateChangedEvent += this.onViaggioAIStateChanged;
|
||||
|
||||
vaim.SpeechRecognitionService.OnFullTranscriptionChangedEvent += this.onFullTranscriptionChanged;
|
||||
@ -193,13 +188,8 @@ public class IntentRecognitionService : MonoBehaviour
|
||||
|
||||
#region Private Functions
|
||||
|
||||
private async void updateOpenAIServiceState()
|
||||
{
|
||||
while (vaim == null)
|
||||
{
|
||||
await System.Threading.Tasks.Task.Delay(10);
|
||||
}
|
||||
|
||||
private void updateOpenAIServiceState()
|
||||
{
|
||||
bool newIsEnabled = vaim.ViaggioAIState == EViaggioAIState.IntentRecognition;
|
||||
|
||||
this.openAIServices_IntentRecognizer.enabled = newIsEnabled;
|
||||
|
5
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/SpeechRecognitionService.cs
Normal file → Executable file
5
Viagg-io/Assets/afca/ViaggioAI/Scripts/AIServices/SpeechRecognitionService.cs
Normal file → Executable file
@ -214,9 +214,10 @@ public class SpeechRecognitionService : MonoBehaviour
|
||||
lock (threadLocker)
|
||||
{
|
||||
this.SpeechRecognitionState = ESpeechRecognitionState.Listening;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
vaim.PlayAudioIfEnabled(this.startedListeningClip);
|
||||
|
||||
recognizer.SpeechStartDetected += this.speechRecognizer_SpeechStartDetected;
|
||||
recognizer.Recognizing += this.speechRecognizer_Recognizing;
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class ControllerInputEventHandler : MonoBehaviour
|
||||
#region Private Functions
|
||||
|
||||
private void checkForInput()
|
||||
{
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
17
Viagg-io/Assets/afca/ViaggioAI/Scripts/ViaggioAI/ViaggioAIManager.cs
Executable file → Normal file
17
Viagg-io/Assets/afca/ViaggioAI/Scripts/ViaggioAI/ViaggioAIManager.cs
Executable file → Normal file
@ -28,7 +28,7 @@ public class ViaggioAIManager : MonoBehaviour
|
||||
private bool debugModeIsActive;
|
||||
|
||||
[SerializeField]
|
||||
private bool soundEffectsEnabled;
|
||||
public bool soundEffectsEnabled;
|
||||
|
||||
[Header("Scene Objects")]
|
||||
[SerializeField]
|
||||
@ -115,28 +115,13 @@ public class ViaggioAIManager : MonoBehaviour
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
this.subscribeToEvents();
|
||||
|
||||
this.initWithDelay();
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
this.unsubscribeFromEvents();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Events
|
||||
|
||||
private void subscribeToEvents()
|
||||
{
|
||||
}
|
||||
|
||||
private void unsubscribeFromEvents()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Events
|
||||
|
Loading…
x
Reference in New Issue
Block a user