coqui-ai / TTS

🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production
http://coqui.ai
Mozilla Public License 2.0
32.19k stars 3.87k forks source link

[Bug] dot pronounced a "punto" in italian :D #3445

Open Zibri opened 7 months ago

Zibri commented 7 months ago

Describe the bug

What I did:

from TTS.api import TTS
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to("cpu")
t=open('text2.txt', 'r').read().replace('\n','')
tts.tts_to_file(text=t, speaker_wav="annap3.mp3", language="it", file_path="testAP3.wav")

The first phrase in the text2.txt is: "Dall'inizio dei tempi, gli Esseri Umani hanno generato rifiuti perché ogni processo di trasformazione ne è condizionato." The last dot in the sentence is "spoken out" and it says "punto" :D (like saying "period" in english)

Expected behavior

The dot should be understood but not poken out.

Environment

{
    "CUDA": {
        "GPU": [],
        "available": false,
        "version": "12.1"
    },
    "Packages": {
        "PyTorch_debug": false,
        "PyTorch_version": "2.1.1+cu121",
        "TTS": "0.22.0",
        "numpy": "1.22.0"
    },
    "System": {
        "OS": "Linux",
        "architecture": [
            "64bit",
            "ELF"
        ],
        "processor": "x86_64",
        "python": "3.10.12",
        "version": "#3570-Microsoft Fri Sep 29 17:00:00 PST 2023"
    }
}
Th3rdSergeevich commented 7 months ago

It has been discussed in #2952

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

Zibri commented 5 months ago

has it been corrected?

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

Fgabz commented 3 months ago

Hi,

The bug is still present (at least in french 🇫🇷 ). I know there is a workaround by replacing the "." with ";" but it sounds really weird for some usecase such as audiobooks

Zibri commented 3 months ago

Hi,

The bug is still present (at least in french 🇫🇷 ). I know there is a workaround by replacing the "." with ";" but it sounds really weird for some usecase such as audiobooks

I confirm. It's still present.

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

nikish3 commented 1 month ago

I found a solution to punto, you need this file, it is in the tts folder (python\lib\tts) files search tokenizer.py, add the line (".", "") there, you will need to select your language accordingly. "ru": [

Russian

(re.compile(r"%s" % re.escape(x[0]), re.IGNORECASE), x[1]) for x in [ ("&", " And "), ("@", " dog "), ("%", "percent"), ("#", " number "), ("$", "dollar"), ("£", "pound"), ("°", "degree"), (".", ""),

0wwafa commented 1 month ago

I found a solution to punto, you need this file, it is in the tts folder (python\lib\tts) files search tokenizer.py, add the line (".", "") there, you will need to select your language accordingly.

That's not a real solution, because if I say "I lover cars." the period as in any other language is not pronounced. but in things like "Version 2.0" the dot "punto" is indeed pronounced.

Arctomachine commented 1 month ago

As mentioned in https://github.com/coqui-ai/TTS/issues/2952, replacing . with \n in input text works. Not solution too, but decent workaround. Can use chatgpt to (almost) reliably replace them.

Zibri commented 1 month ago

As mentioned in #2952, replacing . with \n in input text works. Not solution too, but decent workaround. Can use chatgpt to (almost) reliably replace them.

Even without reading #2952 I already knew that and that's what I also did. I just wanted them to know of this.