TTS
TTS copied to clipboard
[Bug] dot pronounced a "punto" in italian :D
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"
}
}
It has been discussed in #2952
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.
has it been corrected?
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.
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
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.
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.
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"), (".", ""),
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.
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.
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.
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.