py_responsivevoice
ApiKey

Unofficial python API for Responsive Voice
Last tested with ResponsiveVoice - Version 1.6.1
pip install ResponsiveVoicefrom responsive_voice import ResponsiveVoice
engine = ResponsiveVoice()
engine.say("hello world")
engine.say("hello world",
gender=ResponsiveVoice.MALE,
rate=0.45)
engine = ResponsiveVoice(lang=ResponsiveVoice.PORTUGUESE_BR)
file_path = engine.get_mp3(u"olá mundo")
engine.play_mp3(file_path)You can use pre defined configurations, aka, voices
from responsive_voice.voices import EnglishIndia, UKEnglishMale,
PortuguesePortugal
india = EnglishIndia()
uk = UKEnglishMale()
pt = PortuguesePortugal()
india.say("hello world")
uk.say("hello world")
pt.say("olá mundo")say(sentence, mp3_file=None, lang=None, pitch=None, rate=None, vol=None, gender=None, play_cmd="mpg123 %1", blocking=True)None, a temporary file will be created and the text will be played in blocking mode. Otherwise it will be played without blocking.ResponsiveVoice.FEMALEplay_mp3(mp3_file, play_cmd="mpg123 %1", blocking=False)get_mp3(sentence, mp3_file=None, lang=None, pitch=None, rate=None, vol=None, gender=None)None, this will be generated from the text.ResponsiveVoice.FEMALEResponsiveVoice
JarbasAI