aiogTTS
v1.1.1
AIOGTTS (Text-text-to-to-tpeech غير المتزامن) ، وهي مكتبة Python للتفاعل مع Google Translate Text to-Speech API. يكتب بيانات MP3 المنطوقة إلى ملف أو كائن يشبه الملف (bytestring) لمزيد من السمع.
$ pip install aiogTTS import asyncio
from io import BytesIO
from aiogtts import aiogTTS
async def main ():
aiogtts = aiogTTS ()
io = BytesIO ()
await aiogtts . save ( 'Привет, мир!' , 'audio.mp3' , lang = 'ru' )
await aiogtts . write_to_fp ( 'Hallo!' , io , slow = True , lang = 'de' )
asyncio . get_event_loop (). run_until_complete ( main ())