erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
944 stars 110 forks source link

Prune emojis from promt #224

Closed bobcate closed 4 months ago

bobcate commented 4 months ago

I'm using AllTalk as an extension for SillyTavern. When a character uses emojis in the response, the emojis are also sent to AllTalk and this messes up the voice generation, it tries to vocalize the emojis, failing miserably.

Please implement a solution to prune emojis from the prompt before processing the text.

Only thing about this subject I could find was in this reddit post. It lists "Prune emojis from TTS" under bug fixes, so it should be possible to achive this.

erew123 commented 4 months ago

Hi @bobcate

You may want to try this and let me know if it solves it for you.

In your SillyTavern folder, go to the folder \SillyTavern\public\scripts\extensions\tts and open the file alltalk.js in a text editor of your choice. (take a copy of the file first if you just want a easy restore should something go funny. You can delete it after).

Go to line 769 at the bottom of the script:

image

Change the word standard to html:

'text_filtering': "standard",

to

'text_filtering': "html",

Save the file and re-load SillyTavern.

That should strip them out.

Let me know if that works/has issues.

Thanks

erew123 commented 4 months ago

Actually, it wont do it on Narrated text... give me a couple of minutes and Ill pop an update up. Though you will still need to change the setting in the SillyTavern alltalk.js file. Give me 10 ish minutes and Ill post an update to AllTalk.

bobcate commented 4 months ago

Thank you, that fixed it. I guess, since that file belongs to SillyTavern, this is option that should be added by them?

erew123 commented 4 months ago

Oh great! as long as that's sorted for you!

As for the alltalk.js file, its managed by myself. Ill be updating it at some point, more likely when I push out v2 of AllTalk in the next couple of weeks.

Thanks