wsippel / bark_tts

Oobabooga extension for Bark TTS
GNU Affero General Public License v3.0
115 stars 14 forks source link

Issue with some special characters, especially apostrophes [includes fix] #26

Open Scr4tchproof opened 10 months ago

Scr4tchproof commented 10 months ago

Hi there,

First of all, thank you for the awesome extension. I absolutely love it.

I've noticed that it however had an issue with some special characters, especially apostrophes. So instead of saying "I'm" or "I'd" or "he's", it would say the first letter than it would say the character code instead of the apostrophes.

I've looked into script.py and managed to fix the issue by doing the following:

From line 150

Right under

def output_modifier(string, state):

I added

string = string.replace("'", "'")

So that it looks like this:

def output_modifier(string, state):
    string = string.replace("'", "'")
    global model, current_params, streaming_state

This completely fixed the issue for me.

I haven't really found a way to fix quotes yet. I believe the TTS reads them as "in quote", but I'm not sure if this solution could help in such instances as well.

I'm sorry if this is not how these things should be reported, I'm not very versed in all this.

Just hope this helps.

Thanks again!