mirror of https://github.com/coqui-ai/TTS.git
WA: when [!] is not at the end of a sentence, it is used as a glottal stop in the phonetic input and sentences are NOT delimited by [!]
This commit is contained in:
parent
427c9e1100
commit
aae77dac07
|
@ -155,7 +155,13 @@ class Synthesizer(object):
|
||||||
Returns:
|
Returns:
|
||||||
List[str]: list of sentences.
|
List[str]: list of sentences.
|
||||||
"""
|
"""
|
||||||
return self.seg.segment(text)
|
# JMa
|
||||||
|
# WA: fix glottal stop (!): "ahoj, !", "ahoj." => "ahoj, !ahoj."
|
||||||
|
# Exclamation mark (!) at the end of the sentence should not be affected.
|
||||||
|
# return self.seg.segment(text)
|
||||||
|
sents = self.seg.segment(text)
|
||||||
|
split_text = " ".join(sents)
|
||||||
|
return [split_text.replace("! ", "!")]
|
||||||
|
|
||||||
def save_wav(self, wav: List[int], path: str) -> None:
|
def save_wav(self, wav: List[int], path: str) -> None:
|
||||||
"""Save the waveform as a file.
|
"""Save the waveform as a file.
|
||||||
|
|
Loading…
Reference in New Issue