refactored UDP audio sender and receiver scripts to maintain last known peer IP during connection loss, improved logging for audio clip monitoring and peer discovery status
This commit is contained in:
@ -11,8 +11,18 @@ using UnityEngine;
|
||||
namespace Convai.Scripts.Runtime.Multiplayer
|
||||
{
|
||||
/// <summary>
|
||||
/// UDP Speech Receiver - Receives high-quality Convai speech with proper buffering
|
||||
/// This version reconstructs the original AudioClip objects for seamless playback
|
||||
/// UDP Speech Receiver - Receives and plays NPC speech audio from remote player
|
||||
///
|
||||
/// FLOW (Player 1 → Player 2):
|
||||
/// 1. Player 2 speaks to Player 1's NPC
|
||||
/// 2. Player 1's NPC responds with speech
|
||||
/// 3. Player 1's ConvaiUDPSpeechSender transmits the audio
|
||||
/// 4. THIS COMPONENT receives the audio packets
|
||||
/// 5. Reconstructs AudioClips from the packets
|
||||
/// 6. Plays them back on local AudioSource
|
||||
///
|
||||
/// This component should be on a NetworkManager or similar persistent object.
|
||||
/// It receives speech from the remote player's NPC.
|
||||
/// </summary>
|
||||
public class ConvaiUDPSpeechReceiver : MonoBehaviour
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user