Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Dec 11, 2019 11:15 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: NSSpeechSystem using MBS Plugin trying to use radiobuttons
PostPosted: Sun Aug 29, 2010 9:23 am 
Offline

Joined: Sat Jan 23, 2010 3:03 pm
Posts: 244
Location: Ohio, USA
Hi,

Okay I have decided to use a MBS plugin to do speech in my application
because it has access to different voices, etc.

The MBS plugin example uses this to switch voices

if me.ListIndex>=0 then
dim id as string

id=me.CellTag(me.ListIndex,0)

if Speech.setVoice(id) then
if speech.startSpeakingString(me.cell(me.ListIndex,1)) then
// OK
end if
end if

end if


It's a listbox, In my application however I want to use Radio Button controls

So I got a radio button called alex:
if alex.value=true then
call speech.startSpeakingString(va_main.vaedit.text)
end if

I am getting a NILObjectException on this line
call speech.startSpeakingString(va_main.vaedit.text)

Probably because it's not saying what voice to use?

I need to somehow tell the program that I want to use a certain voice

Here's what the example had
'if me.ListIndex>=0 then
'dim id as string
'
'id=me.CellTag(me.ListIndex,0)
'
'if Speech.setVoice(id) then
'if speech.startSpeakingString(me.cell(me.ListIndex,1)) then
'// OK
'end if
'end if
'
'end if

How can I (if even possible) use Radiobuttons instead of a listbox?

Brian


Top
 Profile  
Reply with quote  
 Post subject: Re: NSSpeechSystem using MBS Plugin trying to use radiobutt
PostPosted: Sun Aug 29, 2010 3:10 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
do you have a line like this?

speech = new NSSpeechSynthesizerMBS

and before you speak, you can use

speech.setVoice("com.apple.speech.synthesis.voice.Agnes")

or something like this.
To find the list of voices, use the availableVoicesCount and availableVoice functions.

See
http://www.monkeybreadsoftware.net/clas ... rmbs.shtml

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group