Skip to content

Commit

Permalink
Added readText()
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGaudert committed Feb 18, 2018
1 parent 9af20f4 commit bde5619
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions naturalSpeech.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from gtts import gTTS
import pygame
def readText(outputText):
tts = gTTS(text=outputText, lang='en')

def readText(outputText,language):
tts = gTTS(text=outputText, lang=language)
tts.save("./audioOutput.mp3")

pygame.mixer.init()
Expand Down

0 comments on commit bde5619

Please sign in to comment.