Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import pygame
- from gtts import gTTS
- my_text = 'Добро пожаловать в программу.'
- audio = gTTS(text=my_text, lang="ru")
- audio.save("sample.mp3")
- pygame.mixer.init()
- pygame.mixer.music.load('sample.mp3')
- pygame.mixer.music.play()
- time.sleep(5)
- print(123)
Advertisement
Add Comment
Please, Sign In to add comment