views:

426

answers:

2

Has anyone else experienced (and possibly solved) unintentional pitch changes using MS SAPI TTS voices?

I'm using the SpVoice automation interface with SAPI 5.1.

Right now, my application (VB6 app) can get into a state where the TTS (Microsoft Anna) starts to sound like a chipmunk (proper rate, but high pitch) and even a reboot of Vista does not correct the issue.

I'm passing in XML to the Voice.Speak() function. I've tried sending < pitch absmiddle="0" /> before all other XML and it still does not correct the pitch issue. When I try the TTS voice preview in the Speech control panel, the voice has a normal pitch.

The issue has occurred for me in XP in the past, however a reboot seemed to correct it.

A: 

I haven't seen that happen, although my experience is mostly with SAPI 5.3 with SSML, which gets translated (under the covers) to SAPI TTS.

Have you tried surrounding your text with the <pitch absmiddle="0"> Your Text Here instead of just at the front of the text?

Jason Stevenson
+1  A: 

Can you answer your own question? Can you ask another question in the answer? Too late... :)

My solution was to initialize the Voice.AudioOutputStream.format.Type to something sensible, like 16kHz16BitMono. I had a bug where if there is only one voice available, this initialization step could be skipped. Turns out that (for my project running in a Vista VMWare environment) if you don't set the audio format for the voice, you will get a high pitch voice. Good to know..

Dan