TTS icon indicating copy to clipboard operation
TTS copied to clipboard

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

Open Zibri opened this issue 1 year ago • 12 comments

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"
    }
}

Zibri avatar Dec 19 '23 19:12 Zibri

It has been discussed in #2952

Th3rdSergeevich avatar Dec 21 '23 05:12 Th3rdSergeevich

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.

stale[bot] avatar Jan 28 '24 22:01 stale[bot]

has it been corrected?

Zibri avatar Feb 04 '24 14:02 Zibri

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.

stale[bot] avatar Mar 08 '24 23:03 stale[bot]

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

Fgabz avatar Mar 27 '24 17:03 Fgabz

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.

Zibri avatar Apr 10 '24 22:04 Zibri

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.

stale[bot] avatar May 11 '24 23:05 stale[bot]

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"), (".", ""),

nikish3 avatar Jun 19 '24 09:06 nikish3

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.

0wwafa avatar Jun 21 '24 23:06 0wwafa

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.

Arctomachine avatar Jun 23 '24 13:06 Arctomachine

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.

Zibri avatar Jun 23 '24 16:06 Zibri

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.

stale[bot] avatar Aug 02 '24 02:08 stale[bot]