# Check text before talk?

**URL:** <https://forum.convai.com/t/check-text-before-talk/1490>\
**Category:** Unreal Engine Plugin\
**Tags:** question, unreal-engine\
**Created:** [August 22, 2024, 7:34am UTC](https://forum.convai.com/t/check-text-before-talk/1490 "2024-08-22T07:34:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 7:34am UTC](https://forum.convai.com/t/check-text-before-talk/1490/1 "2024-08-22T07:34:38Z")

</div>

**Original Discord Post by samuelr.1924 | 2024-08-22 07:34:38**

Hello, is there any way I can see what the avatar will say,  
then trigger an event to allow the avatar to say it or not ?

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 9:24pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/2 "2024-08-22T21:24:16Z")

</div>

**Reply by k3kalinix | 2024-08-22 21:24:16**

Hello \<@1042701712554741830\>,

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 9:26pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/3 "2024-08-22T21:26:13Z")

</div>

**Reply by k3kalinix | 2024-08-22 21:26:13**

You can check this Documentation, On Text Received:

> **[Convai Chatbot | Documentation](https://docs.convai.com/api-docs/plugins-and-integrations/unreal-engine/blueprints-reference/convai-chatbot)**
>
> Actor component for the AI character

**Embedded Content:**  
**Convai Chatbot | API Docs**  
Actor component for the AI character  
Link: [Convai Chatbot | Documentation](https://docs.convai.com/api-docs/plugins-and-integrations/unreal-engine/blueprints-reference/convai-chatbot)

 ![Thumbnail](https://canada1.discourse-cdn.com/flex004/uploads/convai/original/1X/edc8ee009e971b280946abb5176913a4061db0a4.png)

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 9:42pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/4 "2024-08-22T21:42:23Z")

</div>

**Reply by samuelr.1924 | 2024-08-22 21:42:23**

the On Text Received is triggered when the Invoke Speech is triggered.  
So the text is displayed at the same time the audio is being played.

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 9:42pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/5 "2024-08-22T21:42:59Z")

</div>

**Reply by samuelr.1924 | 2024-08-22 21:42:59**

I’d like to get the text first, then trigger the invoke speech if i want, so it says the text

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 22, 2024, 9:43pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/6 "2024-08-22T21:43:50Z")

</div>

**Reply by k3kalinix | 2024-08-22 21:43:50**

You have to edit our core blueprints.

cc: \<@365628745886859267\>

He can give some tips.

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 23, 2024, 11:58am UTC](https://forum.convai.com/t/check-text-before-talk/1490/7 "2024-08-23T11:58:47Z")

</div>

**Reply by freezfast | 2024-08-23 11:58:47**

I see, there’s no straight way for that, but you can try to delete the last chat message on the UI and use the function named InterruptSpeech with zero time delay to stop the character from talking as soon as possible

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 23, 2024, 11:59am UTC](https://forum.convai.com/t/check-text-before-talk/1490/8 "2024-08-23T11:59:36Z")

</div>

**Reply by freezfast | 2024-08-23 11:59:36**

You can also set the audio volume to zero on the character Chatbot component and disable the lipsync, so he would not produce any audio or lipsync

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 23, 2024, 11:59am UTC](https://forum.convai.com/t/check-text-before-talk/1490/9 "2024-08-23T11:59:57Z")

</div>

**Reply by freezfast | 2024-08-23 11:59:57**

Let me know if you need an example blueprint on doing that

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 23, 2024, 12:30pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/10 "2024-08-23T12:30:05Z")

</div>

**Reply by samuelr.1924 | 2024-08-23 12:30:05**

I understand the idea, but how to be sure that once I approved the text and when i will trigger the InvokeSpeech again, it will says the same and not generate a new one ? \<@365628745886859267\>

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 23, 2024, 6:43pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/11 "2024-08-23T18:43:38Z")

</div>

**Reply by freezfast | 2024-08-23 18:43:38**

I see, so then let it speak out what it have and as soon as you find the word you’re looking for in `OnTextReceived` then we remove the chat message and run InterruptSpeech to halt the character at once. Sorry if this looks like a hack but if you would like to explain your use case a bit more I might be able to show you other features to help with that

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 26, 2024, 1:21pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/12 "2024-08-26T13:21:48Z")

</div>

**Reply by samuelr.1924 | 2024-08-26 13:21:48**

I am trying to check what the avatar will say, to moderate it live, then once approve, let the avatar talk. A simple TTS should do the trick, but it’s only in entreprise plan apparently.

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [November 25, 2024, 12:14pm UTC](https://forum.convai.com/t/check-text-before-talk/1490/13 "2024-11-25T12:14:41Z")

</div>

This conversation happened on the Convai Discord Server, so this post will be closed.
