Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,9 @@ from gtts import gTTS
|
|
| 4 |
import pygame
|
| 5 |
|
| 6 |
def text_to_speech(text):
|
|
|
|
| 7 |
tts = gTTS(text=text, lang="ko")
|
| 8 |
tts.save("output.mp3")
|
| 9 |
-
pygame.init()
|
| 10 |
pygame.mixer.music.load("output.mp3")
|
| 11 |
pygame.mixer.music.play()
|
| 12 |
while pygame.mixer.music.get_busy():
|
|
|
|
| 4 |
import pygame
|
| 5 |
|
| 6 |
def text_to_speech(text):
|
| 7 |
+
pygame.init() # pygame 초기화
|
| 8 |
tts = gTTS(text=text, lang="ko")
|
| 9 |
tts.save("output.mp3")
|
|
|
|
| 10 |
pygame.mixer.music.load("output.mp3")
|
| 11 |
pygame.mixer.music.play()
|
| 12 |
while pygame.mixer.music.get_busy():
|