[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Voice Text To Speech and Wav File Make and Save
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Voice Text To Speech and Wav File Make and Save
- From: "Ian Mallett" <geometrian@xxxxxxxxx>
- Date: Fri, 11 Jul 2008 20:35:57 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 11 Jul 2008 23:36:03 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=mp6ru4hM08odcuMQx54zhHS9QB5o3Q0Euy0Hxo3a4zQ=; b=LUWgTb8NUMRTxkwNadZEnlwsJbvadi3N0O7+kHJvpyjVGoycJN23L3p1mnlQjy0MGh ZL1Sbe+fRyZe4Z0BK1Vpw0VRPGOYe+jZBpe/v6cOFdHxHvTKPfW6c8n4m6/XaJftgV2n c8taeVqWw/FZ34970J7qWe2pHbGi08MD8bjkM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=NpfJ0xKLAOa351uCxTB4uTjp0H88SsL12JEWd6C6R3i7r9UZP7+tx6Ic5dZAczJEuq mF5xYu2mJWNbIPadBMqukAH5VD2nMLF26ULABL4IiG7OAwneWCM8z+mwjFV8MbD/0TUE LwYBR7a51ybf/autzcyRNTDycDaVAYKdI37zw=
- In-reply-to: <002c01c8df19$fe0647a0$0501a8c0@brucetower>
- References: <002c01c8df19$fe0647a0$0501a8c0@brucetower>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I use pygame.key.get_pressed(). I usually use the state of the input
in question rather than deal with events. My generic input function
looks like:
def GetInput():
key = pygame.key.get_pressed()
for event in pygame.event.get():
if event.type == QUIT or (event.type == KEYDOWN and event.key
== K_ESCAPE):
pygame.quit(); sys.exit()
For your purposes, I now add:
if event.type == KEYDOWN:
text.append(event.key.name)
mpress = pygame.mouse.get_pressed()
mpos = pygame.mouse.get_pos()
All untested (on vaction without a laptop); hope it works!
Good luck,
Ian