How do I script text to speech?

Original Discord Post by fsp9fromscpsecretlaboratory | 2024-03-01 07:54:46

I want to give my Convai character scripted lines, so how can I use the Convai text to speech to read out lines? Also, can I set up an event to let another script know if the plugin has finished reading? Thanks

Reply by sketcher7771 | 2024-03-05 13:35:42

interested

Replying to fsp9fromscpsecretlaboratory’s Message

Reply by fsp9fromscpsecretlaboratory | 2024-03-01 07:54:46
I want to give my Convai character scripted lines, so how can I use the Convai text to speech to read out lines? Also, can I set up an event to let another script know if the plugin has finished reading? Thanks

Reply by cristiandavila | 2024-03-08 23:02:49

I have achieved it but it does not make the talking animation, if someone achieves it I would appreciate it if you would share it

Images:

Reply by cristiandavila | 2024-03-09 00:03:38

I think I’m a genius

Images:

Reply by cristiandavila | 2024-03-09 00:04:20

If you find something better I would love to see it

Reply by fsp9fromscpsecretlaboratory | 2024-03-14 15:00:26

Does anyone know how to do this in unity?

Reply by k3kalinix | 2024-03-15 18:38:03

Hey <@892200854688526356>

Reply by k3kalinix | 2024-03-15 18:38:52

in ConvaiNPC.cs
SendTextDataAsync(string text)
You can use this method.

Example

SendTextDataAsync("Repeat: \"\"\" Hello Test Message \"\"\" ");

Reply by fsp9fromscpsecretlaboratory | 2024-03-17 08:46:29

OK, thank you. By the way, does this send the message to the ai instead of directly to text to speech? It seems a bit slow.

Reply by k3kalinix | 2024-03-27 02:42:10

Yes

Replying to cristiandavila’s Message

Reply by cristiandavila | 2024-03-09 00:03:38
I think I’m a genius

Reply by danielderzic | 2024-04-22 15:22:03

Thanks <@145322080664027136> that helped a lot. What does A and B stand for?

Replying to danielderzic’s Message

Reply by danielderzic | 2024-04-22 15:22:03
Thanks <@145322080664027136> that helped a lot. What does A and B stand for?

Reply by k3kalinix | 2024-04-23 08:43:08

It is an append function.

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