LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

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)
 
Reply to this topic Start new topic
> [CR] SAPI TTS Library
syrus
post 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 ,.
United States us_california us_illinois



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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Nov 16 2007, 04:04 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
jdunham
post Nov 16 2007, 07:20 AM
Post #2


Very Active
***

Member
Posts: 230
Joined: 6-March 05
From: Mountain View, CA
Member No.: 1764
Using LabVIEW Since:1994
LV:8.5 ,. ,.
United States us_california Nothing Selected


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)
Attached File  Speak_Method_Flags_Cluster.ctl ( 7.05K ) Number of downloads: 108
Attached File  SAPI_Speak_SubVI.vi ( 28.62K ) Number of downloads: 123
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
syrus
post 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 ,.
United States us_california us_illinois


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

QUOTE (jdunham @ Nov 15 2007, 11:20 PM) *
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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Norm Kirchner
post Nov 16 2007, 03:50 PM
Post #4


Extremely Active
****

NI
Posts: 607
Joined: 8-December 03
From: Dallas, Texas
Member No.: 208
Using LabVIEW Since:2000
LV:8.6 ,8.2.1 ,7.1.1
United States us_texas us_ohio 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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jdunham
post Nov 16 2007, 04:13 PM
Post #5


Very Active
***

Member
Posts: 230
Joined: 6-March 05
From: Mountain View, CA
Member No.: 1764
Using LabVIEW Since:1994
LV:8.5 ,. ,.
United States us_california Nothing Selected


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. thumbdown.gif It was also dependent on the cluster order (without saying so in a comment) which makes it much harder for code review and maintenance.

This version has some more code, but the options are much more LabVIEW-centric and user-friendly. yes.gif

Jason

This post has been edited by jdunham: Nov 16 2007, 04:30 PM
Attached File(s)
Attached File  SAPI_Speak_SubVI.vi ( 36.9K ) Number of downloads: 92
Attached File  SAPI_Speak_Method_XML_Flag_Enum.ctl ( 4.89K ) Number of downloads: 88
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
syrus
post 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 ,.
United States us_california us_illinois


QUOTE (Norm Kirchner @ Nov 16 2007, 07:50 AM) *
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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
syrus
post 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 ,.
United States us_california us_illinois


Hey Jason,

Thanks for producing these updates; you've made it very clear how the flags should be implemented. thumbup1.gif

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

QUOTE (jdunham @ Nov 16 2007, 08:13 AM) *
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. thumbdown.gif It was also dependent on the cluster order (without saying so in a comment) which makes it much harder for code review and maintenance.

This version has some more code, but the options are much more LabVIEW-centric and user-friendly. yes.gif

Jason


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Norm Kirchner
post Nov 16 2007, 07:33 PM
Post #8


Extremely Active
****

NI
Posts: 607
Joined: 8-December 03
From: Dallas, Texas
Member No.: 208
Using LabVIEW Since:2000
LV:8.6 ,8.2.1 ,7.1.1
United States us_texas us_ohio My Gallery


QUOTE (syrus @ Nov 16 2007, 11:30 AM) *
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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
syrus
post 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 ,.
United States us_california us_illinois


QUOTE (Norm Kirchner @ Nov 16 2007, 11:33 AM) *
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... blink.gif


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jdunham
post Nov 16 2007, 07:49 PM
Post #10


Very Active
***

Member
Posts: 230
Joined: 6-March 05
From: Mountain View, CA
Member No.: 1764
Using LabVIEW Since:1994
LV:8.5 ,. ,.
United States us_california Nothing Selected


QUOTE (syrus @ Nov 16 2007, 11:23 AM) *
Hey Jason,

Thanks for producing these updates; you've made it very clear how the flags should be implemented. thumbup1.gif

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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
syrus
post 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 ,.
United States us_california us_illinois


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)
Attached File  SAPI_TTS_Library_v110.zip ( 157.92K ) Number of downloads: 98
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 7th January 2009 - 10:51 PM