ProPerNounpYK commited on
Commit
884b836
·
verified ·
1 Parent(s): d100c52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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():