📌 عنوان برنامه: برنامه‌ای بنویسید که یک متن (text) را با دو صدای (آقا و خانم) و با دو سرعت خواندن (معمولی / کمی کندتر) و البته بدون نیاز به اینترنت، برای ما بخواند؟

نکته جذاب: اجرای این برنامه، نیازی به اینترنت ندارد!

نکته:
انشاءالله بر اساس این کد، چند پروژه جذاب دیگر خواهیم نوشت!

# **************************************************
# pip install pyttsx4
# https://github.com/Jiangshan00001/pyttsx4
#
# https://www.lipsum.com
# **************************************************
import pyttsx4 as pytts

engine = pytts.init()

voices = engine.getProperty(name="voices")
default_rate = engine.getProperty(name="rate")

text = """Lorem Ipsum is simply dummy text of the
printing and typesetting industry. Lorem Ipsum has
been the industry's standard dummy text ever since
the 1500s, when an unknown printer took a galley of
type and scrambled it to make a type specimen book."""

for voice in voices:
print("Voice Id:", voice.id)

engine.setProperty(name="voice", value=voice.id)

engine.say(text=text)

for voice in voices:
print("Voice Id:", voice.id)

engine.setProperty(name="voice", value=voice.id)
engine.setProperty(name="rate", value=default_rate - 50)

engine.say(text=text)

engine.runAndWait()
# **************************************************

#SourceCode #SourceCode10022
کانال پایتون:
@DT_PYTHON_LEARNING
ادمین:
@Dariush_Tasdighi
کانال اصلی:
@IranianExperts
.
👍86