Check out our General Code Repository Files. Also, before posting here, check to see if your post doesn't fit into another subforum by category.
Tags |
(This content has not been tagged yet)
|
![]() |
Nov 16 2007, 04:04 AM
Post
#1
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
File Name: SAPI TTS Library File Submitter: syrus File Submitted: 11 Nov 2007 File Updated: 21 Nov 2007 File Category: General This library provides a simple set of Sub-VIs to efficiently implement text-to-speech in LabVIEW applications on Windows using the Microsoft Speech API (SAPI). These files are licensed under the Creative Commons Attribution License version 2.5. Type of attribution required: None. Click here to DOWNLOAD this file
|
||
|
|
|||
| Ad |
Nov 16 2007, 04:04 AM
Post
#
|
||
|
|
|
||
|
|
|||
Nov 16 2007, 07:20 AM
Post
#2
|
|||
![]() Very Active Member Posts: 195 Joined: 6-March 05 From: Mountain View, CA Member No.: 1764 Using LabVIEW Since:1994 LV:8.5 ,. ,.
|
That's fun!
Two minor suggestions. On my computer, "Microsoft Mary" is not available, so it's misleading to have it as shown as if it were the default value. I think it would be better to not suggest any default values. In SAPI Speak SubVI.vi, you have an input for flags, but made it a ring control. Flags are supposed to be combined with an OR function, so it is better to have your flags as a cluster of Booleans or maybe an array of enums. I attached a version with the change. Jason This post has been edited by jdunham: Nov 16 2007, 07:23 AM
Attached File(s)
Speak_Method_Flags_Cluster.ctl ( 7.05K )
Number of downloads: 99
SAPI_Speak_SubVI.vi ( 28.62K )
Number of downloads: 107
|
||
|
|
|||
Nov 16 2007, 03:19 PM
Post
#3
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
I'll look at these changes and make an update soon. Note that the Microsoft Mary voice is available from MS for free. You can get an installer here: http://www.cs.unc.edu/Research/assist/pack...ceInstaller.msi. I'll get rid of the default. The example will automagically select your default voice. Microsoft Sam is a very dissapointing voice. The best English voices I have found are from VoiceWare (NeoSpeech in the US). The least expensive way to get them is to purchase the UltraHal text-to-speech reader: http://www.zabaware.com/reader/.
--Syrus That's fun!
Two minor suggestions. On my computer, "Microsoft Mary" is not available, so it's misleading to have it as shown as if it were the default value. I think it would be better to not suggest any default values. In SAPI Speak SubVI.vi, you have an input for flags, but made it a ring control. Flags are supposed to be combined with an OR function, so it is better to have your flags as a cluster of Booleans or maybe an array of enums. I attached a version with the change. Jason
|
||
|
|
|||
Nov 16 2007, 03:50 PM
Post
#4
|
|||
![]() Extremely Active Premium Member ![]() Posts: 588 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
Well since you've demonstrated your ability in one direction. Would you care to collaborate in the other direction?
My dream for 4 years now since scripting came out was to enable a Voice Activated LabVIEW IDE. Simply speak "clear broken" "Error List" "Context Help" "Align (left-right-center)" and all the goodness that can follow. -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
Nov 16 2007, 04:13 PM
Post
#5
|
|||
![]() Very Active Member Posts: 195 Joined: 6-March 05 From: Mountain View, CA Member No.: 1764 Using LabVIEW Since:1994 LV:8.5 ,. ,.
|
After sleeping on it, I am resumbitting my changes. The cluster of flag booleans was easy to program but not as easy for the library user, and that's exactly opposite of how it should be.
This version has some more code, but the options are much more LabVIEW-centric and user-friendly. Jason This post has been edited by jdunham: Nov 16 2007, 04:30 PM
Attached File(s)
SAPI_Speak_SubVI.vi ( 36.9K )
Number of downloads: 82
SAPI_Speak_Method_XML_Flag_Enum.ctl ( 4.89K )
Number of downloads: 80
|
||
|
|
|||
Nov 16 2007, 05:30 PM
Post
#6
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
Well since you've demonstrated your ability in one direction. Would you care to collaborate in the other direction? My dream for 4 years now since scripting came out was to enable a Voice Activated LabVIEW IDE. Simply speak "clear broken" "Error List" "Context Help" "Align (left-right-center)" and all the goodness that can follow. Well, I've got some limited experience interfacing with Dragon Naturally Speaking ActiveX Controls. There is a menu command example you can search for on the ni.com LabVIEW forum. I have nothing that's close to clean that I could release at this time. --Syrus
|
||
|
|
|||
Nov 16 2007, 07:23 PM
Post
#7
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
Hey Jason,
Thanks for producing these updates; you've made it very clear how the flags should be implemented. I don't like the clutter of having so many inputs, so I'm going to come up with a way to simplify things. For example, the "text to speak" input could be polymorphic, accepting either a text input or a file path and automatically setting the 'text is filename' flag. I could alternatively create a separate speak-from-file VI. Regarding all the boolean flags, I'd like to consolidate them into one input. Perhaps a custom control? Any ideas will be appreciated. --Syrus After sleeping on it, I am resumbitting my changes. The cluster of flag booleans was easy to program but not as easy for the library user, and that's exactly opposite of how it should be.
This version has some more code, but the options are much more LabVIEW-centric and user-friendly. Jason
|
||
|
|
|||
Nov 16 2007, 07:33 PM
Post
#8
|
|||
![]() Extremely Active Premium Member ![]() Posts: 588 Joined: 8-December 03 From: Dallas, Texas Member No.: 208 Using LabVIEW Since:2000 LV:8.6 ,8.2.1 ,7.1.1
My Gallery
|
Well, I've got some limited experience interfacing with Dragon Naturally Speaking ActiveX Controls. There is a menu command example you can search for on the ni.com LabVIEW forum. I have nothing that's close to clean that I could release at this time. --Syrus Well I know that MS has it built into the OS now through .NET. but it's more a matter of understanding how to accomplish it. Maybe some day when the FSM grants me the skill -------------------- Norman J. Kirchner Jr.
Automation Software Engineer ~,~ The Captain Was Here Premium Blend ![]()
|
||
|
|
|||
Nov 16 2007, 07:40 PM
Post
#9
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
Well I know that MS has it built into the OS now through .NET. but it's more a matter of understanding how to accomplish it. Maybe some day when the FSM grants me the skill Are you running Vista (which has speech recognition included as part of the OS)? I believe the MS recognizer is bundled with Office XP and newer under Windows XP or Win2k. At my company, we still run XP. Vista is too scary...
|
||
|
|
|||
Nov 16 2007, 07:49 PM
Post
#10
|
|||
![]() Very Active Member Posts: 195 Joined: 6-March 05 From: Mountain View, CA Member No.: 1764 Using LabVIEW Since:1994 LV:8.5 ,. ,.
|
Hey Jason, Thanks for producing these updates; you've made it very clear how the flags should be implemented. I don't like the clutter of having so many inputs, so I'm going to come up with a way to simplify things. For example, the "text to speak" input could be polymorphic, accepting either a text input or a file path and automatically setting the 'text is filename' flag. I could alternatively create a separate speak-from-file VI. Regarding all the boolean flags, I'd like to consolidate them into one input. Perhaps a custom control? Any ideas will be appreciated. --Syrus I agree a polymorphic input is the 'right' way to do it, but I thought it wasn't worth the trouble; then you have to maintain both VIs. Re the booleans: Well you can check out my first attempt; that had all of the booleans as a cluster. But it was really a usability and documentation nightmare (sort of like the Speak function itself, all those flags didn't exactly jump out at you with their obviousness). I think the 'clutter' is a small price to pay for the VI being really easy for a new user to understand. Maybe you could reduce perceived clutter by marking some inputs as optional, like the XML ones, which I'm guessing no one will use. With a cluster or other combined input, you push all of the complexity (the clutter) to the calling diagrams, which I think is a net loss. Those inputs are mostly independent, so why try to hang them off of one connection? There are plenty of icon terminals available and NI doesn't charge extra for using them. Smoke 'em if you got 'em, I always say. Jason
|
||
|
|
|||
Nov 16 2007, 10:06 PM
Post
#11
|
|||
![]() More Active Member Posts: 35 Joined: 28-September 05 From: San Diego Member No.: 3106 Using LabVIEW Since:2002 LV:8.2.1 ,8.0.1 ,.
|
Here is a preview of a 1.1.0 release; I think it's almost ready to upload to the CR.
The SAPI Speak SubVI has been updated based on Jason's contributions. It is now a polymorphic VI that accepts either a text string or a file path as input. If the input is a file path, your computer will attempt to read the contents of the file. (Hopefully the file is a text file. If it is long, you might want to do something to abort the speech stream.) -- Syrus
Attached File(s)
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 07:46 AM |