CaffeineAU / TTSAutomate

A tool to generate Audio files from text strings in WAV and MP3 format, using various TTS engines as the source
54 stars 6 forks source link

Ivona Text To Speech - Doesn't work with French accent #7

Closed LapinFou closed 7 years ago

LapinFou commented 8 years ago

Hi Caffeine,

I got an issue with Ivona TTS. I don't know where is the problem, but if there is some French accent, the MP3 is not generated. Here is an example: telemko | télémétrie perdue I'm using the voice Céline, fr-FR, Female

I hope you can fix this issue, because it is a very good voice.

CaffeineAU commented 8 years ago

Hi Sebastien. the issue lies with getting Ivona to accept accented characters. Their documentation specifies that UTF8 encoded accented characters are accepted, but I haven't been able to get that to work yet. I'll investigate more.

LapinFou commented 8 years ago

OK. Thanks. If I go directly on https://www.ivona.com/ it does work.

CaffeineAU commented 8 years ago

I have resolved the issue. When you UTF8 encode the string, the length changes because of the double width of certain characters. I wasn't taking the length change in to account when calculating the payload length to send to Ivona.

I'll generate a release now.

CaffeineAU commented 8 years ago

Changes incorporated in to release 2.8.2.1

LapinFou commented 8 years ago

I tried. It is better (doesn't stuck), but it is still not working perfectly. It seems that "é è" are replaced with a "e". This is not correct, because the pronunciation is not correct at all.

CaffeineAU commented 8 years ago

So it sounds different to when you put the text in to the Ivona webpage directly?

CaffeineAU commented 8 years ago

Here are two samples, of audio. One is created with the example text you gave (télémétrie perdue) and the other is the same without the accents (telemetrie perdue)

They sound very different to me. I think the accented one sounds almost the same as directly putting it on to the Ivona webpage, but not being a native French speaker, I can't tell how wrong it is.

Samples.zip

LapinFou commented 7 years ago

Hi Caffeine,

Sorry for the late answer. I was away from home during few days. When I copy/paste this sentence: télémétrie retrouvée on the Ivona website, it is perfect. If I used, TTSAutomate, it is not correct. Even for a none French speaker, you can hear a big difference when using the French, Mathieu voice.

Are you sure, that you did not convert the accent é (hex code c3 a9) in è (hex code c3 a8) ? Because It is not the same at all. télémétrie retrouvée (correct) gives the same voice than tèlèmètrie retrouvèe (not correct).

I think, this is the problem.

CaffeineAU commented 7 years ago

Hi Sebastien,

I have resolved the issue. Please try 2.8.2.2

LapinFou commented 7 years ago

I will give a try ASAP. I will keep you inform. Thank again for your work. 😄

LapinFou commented 7 years ago

I tried. It is working !!! Ivona is definitely one of the best French voice.

FYI, the following sentence is not working: vingt & un (21) in French, we pronounced "twenty AND one". It is working on the Ivona website. but vingt et un does work. Probably the character & is not handled.

CaffeineAU commented 7 years ago

Thanks for testing this. I'll look into the handling of the ampersand.

LapinFou commented 7 years ago

You got 2 solutions:

  1. handle the ampersand (nice one)
  2. forbid the usage of the ampersand (quick one). 😺
LapinFou commented 7 years ago

You got 2 solutions:

  1. handle the ampersand (nice one)
  2. forbid the usage of the ampersand (quick one). 😺
CaffeineAU commented 7 years ago

I think handling it is best, although if I replace it with 'and', that won't work for 'et'

I'll see how Ivona is doing it

CaffeineAU commented 7 years ago

Wrong button, sorry!

CaffeineAU commented 7 years ago

I have identified that escaping the ampersand with & amp; resolves the issue. I'll create a release for this shortly.

CaffeineAU commented 7 years ago

The issue is resolved in 2.8.2.4

It's addressed in Ivona and Microsoft engines. I haven't checked whether Google is susceptible yet.

LapinFou commented 7 years ago

I checked in Ivona and Microsoft engines. It is working. Doesn't work with Google.

CaffeineAU commented 7 years ago

Google requires a separate approach; instead of replacing & with & amp;, it must be replaced with %26

I have done this and will now publish 2.8.2.5

LapinFou commented 7 years ago

It does work. Well done! Thanks again. 😄