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
1.16k stars 123 forks source link

SillyTavern AllTalk extension: Pitch must be between -24 and 24. #253

Closed cochese9000 closed 5 months ago

cochese9000 commented 5 months ago

Describe the bug

When using AllTalk extension for SillyTavern, it fails with an error about the pitch not being valid, but it's not even being provided.

I've included a patch-fix for it below, but it's essentially not asking for or sending pitch as an integer to the AllTalk API.

To Reproduce

  1. copy the v2 version of the plugin to the right directory (explained in the instruction.txt)
  2. congifure the plugin (there is no 'pitch' option)
  3. get any char to trigger TTS.
  4. see the error.

Quik Fix:

Add these two lines to the alltalk.js file you copied from the extension folder of AllTalk into the extension folder for ST. They belong in the URLSearchParams body in the fetchTtsGeneration method on line 910.

NOTE: Essentially, this is just hard-coded the two values to be 1 for all speakers. Since there's no speaker-specific pitch controls, this is probably best option for now.

            'rvccharacter_pitch':'1',
            'rvcnarrator_pitch':'1'

A better quick-fix would be set pitch to 1 when it's not provided by the request, not sure where to do that, though.

erew123 commented 5 months ago

Hi @cochese9000

This is for the BETA version.. correct? I only posted an update for it today on the BETA

https://github.com/erew123/alltalk_tts/commit/84312bb6b44916956b6e0c4248a9fc39da2a2edf

and I havnt yet updated the SillyTavern Extension.... Saying that it should be picking out a default from the stored values.

erew123 commented 5 months ago

Hi @cochese9000

Looks like I set it to check it as a string not a number. Should be ok now.

Thanks

erew123 commented 5 months ago

Oh and FYI, where values arent provided, AllTalk v2 pulls from the default settings set in the interface, So no need to hard code values into any extensions (if that makes sense).

cochese9000 commented 5 months ago

Awesome! Thankyou. Yes, correct, it was the V2 version. Nice work! :)