System.speak question

Hi, I am adding speech to my engine monitor project to speak ‘high’ when the temperature is higher than the high set point but lower than the alarm set point. At the low end I have it speak ‘low’ when the reading are in the low range.
My problem is how the word high sounds when the system ‘speaks’ it. It sounds like ‘haa’ to me.
The question is, how can I make that sound more like the way high is pronounced?
I have tried using different spellings like hye, hii but it still does not sound like high.

By the way ‘low’ sounds perfect.

here is the code

if typ = 0 then
  System.Speak(tGaLabel(gid)+ " low")
else
  System.Speak(tGaLabel(gid)+ " high")
end if

The sound is similar for low and high. No different modulation.

What do you expected ?

PS I put tGaLabel(gid) between quotes because I do not have the string there.

I am not sure of what you mean. Computer speech is not my forte.
As I said, low sounds like low, high sounds like haa.
I would like high to sound like high, or hi.

tGaLablel is a array variable that contains a gauge name like ‘Engine Room’ for example. Those words sound fine. The only word I am having problems with is high.

Thanks.

Windows or Mac ?

windows

Mac here. Sound like Hi (pronounced High).

Run this:

Var voice As New OLEObject("SAPI.SPVoice")

Var s As String = "Voices available:" + EndOfLine + EndOfLine

For i As Integer = 0 To voice.GetVoices.Count - 1
  s = s + voice.GetVoices.Item(i).GetDescription + EndOfLine
Next

MessageBox s

Quit

And show the results.

Voices available:

Microsoft David Desktop - English (United States)
Microsoft Zira Desktop - English (United States)

Well, my hope was that your machine were using some localized voice pack that could sound weird in English. But it seems ok. I can’t help with that any further then. :stuck_out_tongue:

I think I am starting to understand. I need to change the voice or perhaps find some new voices at the system level.
Does that sound right?

Looks like David and Zira are the defaults to US. I would stand with one of those to avoid a hell with users needing to install voices…

I am not sure of which ‘voice’ is active or how to change it, but I will figure it out. Thank you for your help.

I guess David, the voice index 0

I also have Zira here. Let me try something…

Var voice As New OLEObject("SAPI.SPVoice")
voice.Voice = voice.GetVoices.Item(1)  // Zira
voice.Volume = 90
voice.Rate = 0

voice.Speak("Hello, it's high")

MessageBox "Ok to quit"

Quit

Need to go now, Have fun playing with it.

You could also try using one of those AIs that’s good at speaking to “pre-record” the two phrases. Add the sound files to your project and use Sound.Play instead of Speak.

1 Like

Thank you for that. That voice does pronounce it much better. Now I have more to play with.

1 Like

Thank you, I thought of that but I like to sound of a computer generated voice, when it sounds right. This is all new to me.

Tim’s tip is a good tip when you don’t need to speak dynamic content. It probably does not fail, Speak may or may not, depending on what’s installed on the system.

In my system the sound sometimes is perfect, sometimes it presents glitches. Probably Microsoft imperfections.

Thanks Rick, here is the code that is working for me.

Var voice As New OLEObject("SAPI.SPVoice")
voice.Voice = voice.GetVoices.Item(1)  // Zira
voice.Volume = 100
voice.Rate = -1
var mWords as String
if typ = 0 then
  mWords = tGaLabel(gid)+ " low"
else
  mWords = tGaLabel(gid)+ " high"
end if

voice.Speak(mWords)

I may try Tim’s idea later. I am guessing that I could have the sound output altered to sound many different ways. Also being able to add more words like, instead of ‘oil high’, ‘oil pressure high’ sounds compelling, the downside to me is needing to have a different sound file for each gauge. Thanks everyone for the great ideas. Just when I thought I was almost done.

1 Like