uezo / ChatdollKit

ChatdollKit enables you to make your 3D model into a chatbot
Apache License 2.0
693 stars 74 forks source link

Add support for muting microphone #248

Closed uezo closed 10 months ago

uezo commented 10 months ago

Stop capturing data from microphone when muted. UnityEngine.Microphone ends internally.

var microphone = GetComponent<ChatdollMicrophone>();

// Mute
microphone.SetMute(true);

// Unmute
microphone.SetMute(false);

// Toggle
microphone.ToggleMute();

Also remove ChatdollMicrophone.IsUpdateOnThisFrame to detect silence to control recording session even no frame data comes from microphone.