Fritzeh 0 Newbie Poster

Hi, I'm trying to create a text to speech application with the ability to play, pause, resume , stop rewind and fast forward sections of text. Also play selected.
The first problem is, I want to make one button handle play, pause and resume.

I attempted using a case:

PrivateSub btnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlay.Click
Select Case btnPlay.Text
Case "Play"
ReadOut()
btnPlay.Text = "Pause"
Case "Pause"
vox.Pause()
btnPlay.Text = "Resume"
Case "Resume"
vox.Resume()
btnPlay.Text = "Pause"
'End Select
End Sub

but this just ended up looping on resume and pause as the text would not reset to "play" even though i wrote a line of code in the readout() method to set .text to Play. I have considered using a timer to make the button do certain things but cant remember quite how it would work.

The main issue is, if i pause the speech, and then accidently press play, i get an error, so if i have it all in one box i avoid the error and have a clearer UI.

The idea is, one button, initially set to "play".

if clicked, readout(), text = pause
if clicked while text = pause , text = resume etc..

However the SDK 5.1 does not seem to include any boolean for isSpeak or isPaused.

The other problem is no matter how much i search, i cant find the setting to adjust pitch of voice.

Also any links or advice on how to read documents such as .rtf and .doc files. (however i do not have word installed so i cant reference to it.) would be much appreciated!

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.