Tuesday, May 22nd 2012, 12:05am UTC+2

You are not logged in.

  • Login
  • Register

Nisheeth

Beginner

Posts: 7

Location: India

Occupation: Researcher

1

Monday, November 1st 2010, 8:03am

Using Speech and Unicode

Hello

I am new to jabaco (have downloaded it just 2 days ago, and have been experimenting with it). I was an efficient VB6 programmer, until VB.net came. It became very taxing to develop application in a resource hungry environment. So, I switched to java and have been struggling ever since. I was developing applications using microsoft agents, was wondering if we can use java's speech api in jabaco. If so then how, otherwise can they be implemented in future versions.

Secondly, one thing I really wanted in VB was it to support unicode. Jabaco can display things given in a rich text box. but other wise, in design time or in a code window, I could not write any non-english characters. I would be really glad if you could implement the same in future versions.

thank you, you have given me a hope that I can still be effective.

regards,
nisheeth :)

A1880

Intermediate

Posts: 500

Location: Hanover, Germany

Occupation: Software Engineer

2

Monday, November 1st 2010, 1:16pm

The following demo sample shows how to use freetts as speech output:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Option Explicit

'
'  Demo inspired by:
'  http://www.developers-guide.net/c/115-einstieg-in-das-java-speech-api.html
'
'  This project requires freetts.jar to be part of the classpath:
'  http://sourceforge.net/projects/freetts/files/FreeTTS/FreeTTS%201.2.2/freetts-1.2.2-bin.zip/download
'

Import com.sun.speech.freetts.Voice
Import com.sun.speech.freetts.VoiceManager

Public Sub Command1_Click()
   speak Me.Text1.text
End Sub

Private Sub showVoices()
   Dim voiceManager As VoiceManager = voiceManager.getInstance()
   Dim s As String 
      
   s = voiceManager.toString() 
   
   MsgBox s, vbInformation, "available voices"
End Sub

Private Sub speak(msg As String)
   Dim voiceManager As VoiceManager = voiceManager.getInstance()
   Dim voice As Voice = voiceManager.getVoice("kevin16")

   voice.allocate()

   voice.speak(msg)

   voice.deallocate()
End Sub

Public Sub Form_Load()
   Me.Text1.Text = "Good morning Java World! It's a great day to speak some words."
   showVoices
End Sub


Volunteers needed to show how to integrate the MBROLA engine here!

Regarding display of Unicode characters, I have to refer you to the Java literature.
Java Swing is Unicode enabled, but I don't know how to make use of this from within Jabaco.

Happy experimenting!

A1880

Nisheeth

Beginner

Posts: 7

Location: India

Occupation: Researcher

3

Monday, November 1st 2010, 1:41pm

thank you :)

Rate this thread
WoltLab Burning Board