gTTS version bump (#454)

* upgrading gTTS

	- using play_mp3 to play mp3 files

Conflicts:
	mycroft/tts/google_tts.py

* Update gTTS version

* default to 'us-en' if lang is omitted

* Fix multiple sentence speech.

Wait until audio has been played before exiting `GoogleTTS.execute()`
pull/450/head^2
Åke 2017-01-20 22:21:03 +01:00 committed by Arron Atchison
parent e0ca80270c
commit 2a9bc7bda2
3 changed files with 7 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class TTS(object):
def __init__(self, lang, voice, validator):
super(TTS, self).__init__()
self.lang = lang
self.lang = lang or 'en-us'
self.voice = voice
self.filename = '/tmp/tts.wav'
self.validator = validator

View File

@ -19,7 +19,7 @@
from gtts import gTTS
from mycroft.tts import TTS, TTSValidator
from mycroft.util import play_wav
from mycroft.util import play_mp3
__author__ = 'jdorleans'
@ -31,7 +31,8 @@ class GoogleTTS(TTS):
def execute(self, sentence):
tts = gTTS(sentence, self.lang)
tts.save(self.filename)
play_wav(self.filename).communicate()
p = play_mp3(self.filename)
p.communicate() # Wait for termination
class GoogleTTSValidator(TTSValidator):

View File

@ -6,7 +6,8 @@ requests==2.8.1
pyOpenSSL==16.0.0
ndg-httpsclient==0.4.0
pyasn1==0.1.9
gTTS==1.0.7
gTTS==1.1.7
gTTS-token==1.1.1
backports.ssl-match-hostname==3.4.0.2
certifi==2016.2.28
PyAudio==0.2.8