Update text_to_speech.py
This commit is contained in:
@@ -114,7 +114,7 @@ class Speech():
|
|||||||
def shorten_paragraph(self, sentence):
|
def shorten_paragraph(self, sentence):
|
||||||
#TODO find a better way, we would like to have the TTS not be annoying, speak only useful informations
|
#TODO find a better way, we would like to have the TTS not be annoying, speak only useful informations
|
||||||
"""
|
"""
|
||||||
Find long paragraph like **explaination**: <long text> by keeping only the first sentence.
|
Find long paragraph like **explanation**: <long text> by keeping only the first sentence.
|
||||||
Args:
|
Args:
|
||||||
sentence (str): The sentence to shorten
|
sentence (str): The sentence to shorten
|
||||||
Returns:
|
Returns:
|
||||||
@@ -186,4 +186,4 @@ if __name__ == "__main__":
|
|||||||
spk = Speech(enable=True, language="en", voice_idx=2)
|
spk = Speech(enable=True, language="en", voice_idx=2)
|
||||||
for i in range(0, 5):
|
for i in range(0, 5):
|
||||||
print(f"Speaking english with voice {i}")
|
print(f"Speaking english with voice {i}")
|
||||||
spk.speak(tosay_en, voice_idx=i)
|
spk.speak(tosay_en, voice_idx=i)
|
||||||
|
|||||||
Reference in New Issue
Block a user