diff --git a/Assets/Inworld.AI/Scripts/Runtime/Audio/AudioCapture.cs b/Assets/Inworld.AI/Scripts/Runtime/Audio/AudioCapture.cs
index d5b51eef5..97d391c5c 100644
--- a/Assets/Inworld.AI/Scripts/Runtime/Audio/AudioCapture.cs
+++ b/Assets/Inworld.AI/Scripts/Runtime/Audio/AudioCapture.cs
@@ -39,6 +39,8 @@ public class AudioCapture : MonoBehaviour
public void StartRecording(bool autoPush = true)
{
+ if (!Microphone.IsRecording(null))
+ m_Recording = Microphone.Start(null, true, m_BufferSeconds, m_AudioRate);
m_LastPosition = Microphone.GetPosition(null);
m_AudioToPush.Clear();
IsCapturing = true;
diff --git a/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldCharacter.cs b/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldCharacter.cs
index de17aca65..673ab2e3e 100644
--- a/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldCharacter.cs
+++ b/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldCharacter.cs
@@ -7,6 +7,7 @@
using Inworld.Packets;
using Inworld.Util;
using System.Collections;
+using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
@@ -372,10 +373,14 @@ public void SendText(string text)
/// The trigger to send. Both formats are acceptable.
/// You could send either whole string from CharacterData.trigger, or the trigger's shortName.
///
- public void SendTrigger(string triggerName)
+ /// A Dictionary with its param name, and its value.
+ public void SendTrigger(string triggerName, Dictionary param = null)
{
string[] trigger = triggerName.Split("triggers/");
- SendEventToAgent(trigger.Length == 2 ? new CustomEvent(trigger[1]) : new CustomEvent(triggerName));
+ CustomEvent evt = trigger.Length == 2 ? new CustomEvent(trigger[1]) : new CustomEvent(triggerName);
+ if (param != null)
+ evt.Parameters = param;
+ SendEventToAgent(evt);
}
///
/// Send general events to this Character.
diff --git a/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldController.cs b/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldController.cs
index 59da4d6f5..f18718d40 100644
--- a/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldController.cs
+++ b/Assets/Inworld.AI/Scripts/Runtime/Entities/InworldController.cs
@@ -341,7 +341,7 @@ void _StartSession()
m_Client.StartSession();
#pragma warning restore 4014
State = ControllerStates.Connected;
- InworldAI.Log("InworldController Connected");
+ InworldAI.Log($"InworldController Connected {m_Client.SessionID}");
StartCoroutine(InteractionCoroutine());
}
IEnumerator SwitchAudioCapture()