tts
thvid.tts
¶
Functions:
-
tts_on_edge
–TTS using Edge browser
-
tts_on_gTTS
–Args:
-
tts_off_pyttsx3
–Convert text to speech using Windows' voices.
tts_on_edge(text: str, lang: str = 'vi', voice_name: str = 'vi-VN-HoaiMyNeural', audio_file: str = 'voice.mp3')
¶
TTS using Edge browser
tts_on_gTTS(text, lang='en', audio_file='voice.mp3')
¶
Parameters:
-
text
(str
) –text string
tts_off_pyttsx3(text, lang='vi', voice_name='', voice_id=None, rate=150, vol=1.0, audio_file='voice.mp3')
¶
Convert text to speech using Windows' voices. Agrs: lang (str): select the language. Possible with all voices available in local computer: 'vi', 'VN', 'US',... text (str): string of text rate (float): voice speed voice_name (str): name of speaker. voice_id (int): id of voices in Windows, this parameter sets both languages and voice.