V
V
VladikTanashuk2021-10-13 13:24:38
Python
VladikTanashuk, 2021-10-13 13:24:38

Aiogram - how to send gTTS audio file without saving to disk?

Is there a way to send a voice file to a user without saving it to disk?
I send the photo as follows:

bio = BytesIO()
bio.name = image
img.save(bio, 'PNG')
bio.seek(0)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-13
@VladikTanashuk

Are you asking how to store the gTTS output into a BytesIO object, or how to send BytesIO content through a cart?
Because if it's the first, it's in the gTTS documentation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question