varapiKey=Environment.GetEnvironmentVariable("SIMLI_API_KEY")is{Length:>0}key?key:thrownewAssertInconclusiveException("SIMLI_API_KEY environment variable is not found.");varfaceId=Environment.GetEnvironmentVariable("SIMLI_FACE_ID")is{Length:>0}id?id:"default";// Use default face if not specifiedvarclient=newSimliClient(apiKey);// Create and connect via the unified interfaceawaitusingvaravatar=awaitSimliRealtimeAvatarClient.ConnectAsync(client,faceId);// Verify the adapter implements IRealtimeAvatarClienttryAGI.RealtimeAvatar.IRealtimeAvatarClientrealtimeClient=avatar;// SendTextAsync should throw NotSupportedException (Simli is audio-only)Func<Task>sendText=()=>avatar.SendTextAsync("test");// Send a short PCM16 audio chunk (silence)varsilentAudio=newbyte[3200];// 100ms of silence at 16kHz mono PCM16awaitavatar.SendAudioAsync(silentAudio);// The connection should be established// Note: IsConnected checks both WebSocket and WebRTC state// WebRTC may take a moment to establish