AutoHotkey Community

It is currently May 26th, 2012, 8:00 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: July 6th, 2009, 6:56 am 
Hi,

I am using pywin32com.client for Text to speech in Windows Vista. The default voice is Microsoft Anna.

Now I install espeak for windows and now I get three more voices. These voices are displayed in the Control Panel--> Text to Speech.

I am writing a python application. I want to know is there any function of pywin32.com.client.Dispatch() which can return me a list of all the currently installed voices in the computer which I can display in a combo box in my application. Although the user can always go to the control panel to change the default voice, but I want him to select it from my application only without going to the control panel.

Thanks and regards

Chirag

[ Moderator!: Moved from Scripts and Functions ]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2009, 7:18 am 
mod, please move to ask for help


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2009, 5:08 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
* Bump *


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2009, 7:45 am 
Offline

Joined: June 24th, 2008, 8:30 am
Posts: 126
I know this seems like an obvious question, but have you checked the python documentation, or tried a python forum?

http://python-forum.org/pythonforum/index.php

_________________
“Whenever I'm about to do something, I think, 'Would an idiot do that?' And if they would, I do not do that thing.”

-Dwight


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2009, 8:15 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Code:
COM_Init()
pvoice  := COM_CreateObject("SAPI.SpVoice")
pvoices := COM_Invoke(pvoice, "GetVoices")
Loop, %   COM_Invoke(pvoices, "Count")
   sVoices .= COM_Invoke(pvoices, "Item[" A_Index-1 "].GetDescription") "`n"
COM_Release(pvoices)
COM_Release(pvoice)
COM_Term()

MsgBox % sVoices


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, joetazz, Retro Gamer, wolverineks and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group