1.6M حجم رسانه بالاست
مشاهده در ایتا
"🎙️ با چند خط کد Python متنهایتان را به صدا تبدیل کنید!
با کتابخانههای gTTS و playsound میتوانید فایل صوتی بسازید و متنها را بشنوید.
✅ ساده، سریع و کاربردی برای آموزش و پروژههای خلاقانه!
اول نصب کتابخانه:
#pip install gTTS playsound
کد کامل:
from gtts import gTTS
from playsound import playsound
text = """Python is one of the most popular programming languages in the world.
Learning Python opens the door to endless opportunities in software development, data analysis, and artificial intelligence.
Join us and start your journey to becoming a skilled Python programmer today!"""
tts = gTTS(text=text, lang='en')
tts.save("output.mp3")
playsound("output.mp3")
#Python #TextToSpeech #gTTS #CodingMagic #LearnPython"