پایتون ( Python )
◀️اینجا با تمرین و چالش با هم پایتون رو یاد می گیریم ⏮بانک اطلاعاتی پایتون پروژه / code/ cheat sheet +ویدیوهای آموزشی +کتابهای پایتون تبلیغات: @alloadv 🔁ادمین : @maryam3771
إظهار المزيد- المشتركون
- التغطية البريدية
- ER - نسبة المشاركة
جاري تحميل البيانات...
جاري تحميل البيانات...
pip install pillow
Then, use this script:
from PIL import Image
in_img = 'input.jpg'
out_img = 'grayscale.jpg'
# Open the image
with Image.open(in_img) as img:
# Convert the image to grayscale
grayscale_img = img.convert('L')
# Save the grayscale image
grayscale_img.save(out_img)
import ChatTTS
from IPython.display import Audio
chat = ChatTTS.Chat()
chat.load_models()
texts = ["<PUT YOUR TEXT HERE>",]
wavs = chat.infer(texts, use_decoder=True)
Audio(wavs[0], rate=24_000, autoplay=True)
ChatTTS is a text-to-speech model designed specifically for conversational scenarios such as LLM assistant.
ChatTTS supports both English and Chinese (if relevant).
🖥 GitHub
👉 Hugging Face
👉 ChatTTS page
🆔 @Python4all_proIn this article, we will briefly see 30 short code snippets that you can understand and learn in 30 seconds or less. These will save you the trouble of surfing Stack Overflow every time you need to do something.
Multiple Color Detection in Real-Time using Python-OpenCV - Colour detection is the process of detecting the name of any colour. Simple isn’t it? Well, for humans this is an extremely easy task but for computers, it is not straightforward. Human eyes and brains work together to translate light into colour.