How to use the tts.Google function in TTS

To help you get started, we’ve selected a few TTS examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thomasweng15 / E.V.E. / hal-e / hal-e.py View on Github external
def parse(self, line):
		params = [param.lower() for param in line.split() if param]
		if params == ['hal-e', 'listen']:

			listen()
		
		elif params == ['shut', 'down', 'program']:

			print "Halley will go to sleep now. Good bye!"
			tts.Google().play_wav("./hal-e/wav/sleep.wav")
			print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" 
			print "+++++++++++++++++++++++  HAL-E HAS SHUT DOWN  ++++++++++++++++++++++++"
			print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
			sys.exit(1) # note: doesn't exit julius speech listener
github thomasweng15 / E.V.E. / brain / brain.py View on Github external
def __init__(self):
		self.speaker = tts.Google()
		self.voice_cmd = VoiceCommand(self.speaker)
		self.print_welcome()

		print "Saying: Hello there!"
		self.speaker.play_wav("./wav/hello.wav")
github thomasweng15 / E.V.E. / hal-e / hal-e.py View on Github external
def listen():
	print "Initializing..."
	speaker = tts.Google()
	
	if not internet_on():
		print("No Internet connection.")
		speaker.play_wav("./hal-e/wav/internet_err.wav")
		return

	speaker.play_wav("./hal-e/wav/yes.wav")

	try:
		audioInput = Microphone()
		audioInput.listen()
 
		speech_to_text = stt.Google(audioInput)

		recorded_text = speech_to_text.get_text()
		job = Job(recorded_text)
github thomasweng15 / E.V.E. / jarvis / jarvis.py View on Github external
def main():
	speaker = tts.Google()

	# test internet connection
	if not internet_on():
		speaker.play_wav("./jarvis/wav/internet_err.wav")
		return

	try:
		speaker.play_wav("./jarvis/wav/yes.wav")

		audioInput = Microphone()
		audioInput.listen()

		# init new Voice class associated with audio 
		speech_to_text = stt.Google(audioInput)

		# convert audio file into text and init a new Job class with text
github thomasweng15 / E.V.E. / brain / listen.py View on Github external
def __init__(self, AI):
		print "Saying: Yes?"
		self.speaker = tts.Google()
		self.speaker.play_wav("./wav/yes.wav")
		self.AI = AI
		
		self.listen()