Link to home
Start Free TrialLog in
Avatar of Rashimus
Rashimus

asked on

(SAPI 5.1) Where to find a VB component which provides NON-english Text-to-Speech

Hi all,

Im currently using the SAPI 5.1 SDK for VB, I want the Text-to-Speech to be able to speak in a language other than English, preferably French, German or Spanish.

I require this as part of a Speech-recognition and Language Translation application that i am writing.

If anyone can help with some links or solutions i will be very greatful. If you think this is not possible, i would be grateful for anybody to mention this to me.

Thanks

Rashel
Avatar of DocM
DocM

I haven't actually used the SAPI component, but I think all you have to do is put the text in a string and it will say it.

i.e.
Dim Voice As SpVoice
Set Voice = New SpVoice
Voice.Speak "Como estas" ,SVSFlagsAsync
Voice.Speak "Parle vous frances?" ,SVSFlagsAsync

Give it a shot, I'd be interested to know if it works.
Avatar of Rashimus

ASKER

Thanks for both of your comments.

Unfortunately, to my disadvantage I cannot actually speak any of these foreign languages, therefore was unable to understand the majority of the link given by "DocM", it seems like it has something to do with an agent which can be set to speak a particular language. Therefore I think it’s not what I’m looking for.

What I actually need to do is speak out in French, German, Spanish or other language that is not English from Text. The spVoice object speaks in English and uses English Grammar. At present I am already using a similar solution to what was proposed by "J-Man" where I just speak the foreign text using the default spVoice, this sounds very peculiar because it sounds completely wrong and rather funny.

That’s why I was trying to find a component or something that’s specifically designed to allow the SAPI to speak in French for example.

Any ideas?
After looking at the docs for a few minutes, this is what I think (IMHO).  You will probably have to create your own Lexicon.  Which basically amounts to a IPA based list of "how to pronounce this word." see ISpLexicon (Application Level Interface).
ASKER CERTIFIED SOLUTION
Avatar of Shaka913
Shaka913

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Shaka913 and others...

You have openned my eyes in this area.

Just to clarify, I mentioned the language translation concept in my previous comment for completeness, as it is an integral part of my application. I dont need sapi to worry about this as i carry out the translation myself and i understand that sapi has nothig to do with this.

My objective is, once i have translated some text from english to german/french/spanish. I want to hear what it sounds like in the relavant language. My application needs to do this in order provide its service.

From shaka913's comments its seems to me that you are telling me that i can get a (eg)french TTS and install it, making it appear in control panel and then possibly programmatically select it, if and when i require my speech object to use that language.

Is this true, or am i just getting ahead of myself because it seems like the perfect solution.

I will be happy to accept a further comment as an answer if it justifies what im getting at, and if you can provide some links or snippets for changing from different reco's programmatically that would be a bonus.

Thank you very much, i look forward to further comments on this issue.

Rashel
Here is code to load a combo box (VoiceCB) with a list of "available" tts engines to SAPI

 ' Creates the voice object first
    Set Voice = New SpVoice
   
    ' Load the voices combo box
    Dim Token As ISpeechObjectToken

    For Each Token In Voice.GetVoices
        VoiceCB.AddItem (Token.GetDescription())
    Next

Next is code to handle changing the Selection in the ComboBox (VoiceCB)

Private Sub VoiceCB_Click()
    ' change the voice to the selected one
    Set Voice.Voice = Voice.GetVoices().Item(VoiceCB.ListIndex)
End Sub

This should tell you what you need to do to pick the appropriate TTS engine.

Good Luck
Thanks Shaka913.

Thats brilliant, just another question please.

Do you know any good non-english TTS's that i can download
Preferably French or German, but it doesnt really matter.

Thanks in advance, either way!

Rashel
http://www.digalo.com/digalo_pc.asp is one example. go to google and search for french tts sapi

Good Luck
are you satisfied? points?
All the comments Shaka913 provided for this question combined has helped me to a solution

Thanks