Skip to content

Commit 99e076e

Browse files
Fixed NPC2NPC infinite loop issue
1 parent 47cf938 commit 99e076e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Source/Convai/Private/ConvaiChatbotComponent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,9 @@ void UConvaiChatbotComponent::Broadcast_onEmotionReceived_Implementation(const F
707707

708708
void UConvaiChatbotComponent::OnTranscriptionReceived(FString Transcription, bool IsTranscriptionReady, bool IsFinal)
709709
{
710+
LastTranscription = Transcription;
711+
ReceivedFinalTranscription = IsFinal;
712+
710713
// Broadcast to clients
711714
if (UKismetSystemLibrary::IsServer(this) && ReplicateVoiceToNetwork)
712715
{
@@ -742,9 +745,6 @@ void UConvaiChatbotComponent::OnTranscriptionReceived(FString Transcription, boo
742745
OnTranscriptionReceivedEvent.Broadcast(Transcription, IsTranscriptionReady, IsFinal);
743746
});
744747
}
745-
746-
LastTranscription = Transcription;
747-
ReceivedFinalTranscription = IsFinal;
748748
}
749749

750750
void UConvaiChatbotComponent::onResponseDataReceived(const FString ReceivedText, const TArray<uint8>& ReceivedAudio, uint32 SampleRate, bool IsFinal)

0 commit comments

Comments
 (0)