12-22-2019 02:21 PM - edited 12-22-2019 02:28 PM
There's a bug with trying to use overloads with this .NET method. When you select an overload from the menu, it always defaults to the AppendText(String, PromptEmphasis) one, and all of them are checked in the menu.
Here's a simple snippet in LV 2014 that demonstrates the problem. Try to select any of the overloads and see what I mean. I believe it hasn't been fixed yet.
Could someone verify it for me?
I guess it's somewhat ironic that the only overload available to LabVIEW is the only one that isn't supported by the Windows speech engine.
12-22-2019 04:31 PM
I see the same behavior, but I have no problem using that method. Win10+LV14
12-22-2019 05:08 PM
Sorry, Darin - I misspoke. I can use the basic form, but if I wanted to do something with the text, the only thing available is "emphasis". Thanks for answering on a Sunday evening. 🙂
12-22-2019 06:37 PM - edited 12-22-2019 07:05 PM
I can get just AppendText(Text).
Is that what you are looking for ?
12-22-2019 07:01 PM
@psuedonym wrote:
I can get just AppendText(Text).
Is that what you are looking for ?
That is what I see, too. If you try to select any of the other overloads, you just get the emphasis one.
12-22-2019 07:04 PM
I think you need to use a System.Speech.Synthesis.PromptVolume constructer and get the PromptVolume of ExtraLoud and wire to Emphasis if you want to change the volume.
LabVIEW seems them all as integers.
See if that works.
12-22-2019 07:39 PM
Unfortunately it doesn't work. I was hoping it would morph, but it didn't. However, I think maybe Microsoft was lying about not supporting emphasis, because it did seem to change the inflection of the voice, as if the more emphasis you gave it, the more urgent it sounded.
I think it's just broken. What should happen - or at least what I've experienced with other, similar overload situations, was that only the correct one had a check mark next to it, and it displayed the appropriate parameters.
I appreciate you trying to help out. I love this forum because of that. 🙂
12-22-2019 07:48 PM - edited 12-22-2019 07:50 PM
I am not sure what you mean by morph.
The second parameter --- PromptRate, PromptEmphasis, PromptVolume --- is an enum which basically is an integer.
I am thinking that using the constructor System.Speech.Synthesis.PromptVolume and getting the Property of ExtraLoud and wiring that to Emphasis will cause the volume to be very loud. That's the easiest to check.
12-22-2019 08:51 PM
@psuedonym wrote:
I am not sure what you mean by morph.
The second parameter --- PromptRate, PromptEmphasis, PromptVolume --- is an enum which basically is an integer.
I am thinking that using the constructor System.Speech.Synthesis.PromptVolume and getting the Property of ExtraLoud and wiring that to Emphasis will cause the volume to be very loud. That's the easiest to check.
I do know what an enum is - that's not badge in my sig - it's a cert. 😉 Yes, what you described above is what I tried. All it does it throw an error that the value was out of bounds - which is to be expected, because PromptVolume has 8 items while PromptEmphasis has only 5.
I do appreciate your help, believe me; maybe reading the MS Documentaion on it will help to clarify what I am talking about.
When I meant "morph", I meant it literally. Like when you wire a constant to a polymorphic VI, it selects the instance that handles that datatype.