my dog learned polymorphism*
The moose likes Java Micro Edition and the fly likes problem with including jsapi library; sending SMS to server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "problem with including jsapi library; sending SMS to server" Watch "problem with including jsapi library; sending SMS to server" New topic
Author

problem with including jsapi library; sending SMS to server

Johny Wyenski
Greenhorn

Joined: Sep 11, 2009
Posts: 21
Hello!

I downloaded some .jar files from http://sourceforge.net/projects/cmusphinx/files/sphinx4/. I want to run sphinx4-1.0beta3-bin\sphinx4-1.0beta3\bin\HelloDigits.jar. This file is 4kB and is seen by system as "Executable Jar File" so everything should be all right. Unfortunately, there are some errors when running it with "java -jar Hello.jar" in Command Prompt.



It looks like there is no required javax.speech.recognition.GrammarException. I found this site http://java.sun.com/products/java-media/speech/index.jsp but I cannot find those files which I need to download. Where should I copy them - to the directory with HelloDigits.jar? Can anybody tell me which files I should download, please?

And my other question is: can I send SMS from mobile phone with the use of Java application to the server? How to do it? I only found projects Gnokii and Gammu+ but it looks like they cannot help me with sending SMS from phone to server.

Greetings!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37953
    
  22
Welcome to JavaRanch

Some of those questions sound too difficult for us here at "beginning Java" but questions about installation belong here. I went into the speech API FAQ and found this. From that I went to FreeTTS and they gave installation instructions. I think "bin" will suffice. I presume you know about adding .jar files to your CLASSPATH?
IBM seems no longer available: Cloud Garden didn't give too many details. There were about 4 more. L&H seem to be called nuance now.

Don't know much about these speech APIs, so I can't help you much more. Sorry.
Johny Wyenski
Greenhorn

Joined: Sep 11, 2009
Posts: 21
Thanks for your answer!

This question in the FAQ is not the answer - CMU Sphinx is one of those developers who have got access to full informations about JSAPI. I don't need to use JSAPI on my own - I need to install or copy required file to the proper place to enable CMU Sphinx to use those JSAPI libraries.

About FreeTTS - I don't need speech synthesizer (FreeTTS) but speech recognizer (CMU Sphinx).

And about TalkingJava SDK - I decided to use CMU Sphinx so I don't need it. The main thing is that I don't know how to enable those JSAPI libraries to be used by CMU Sphinx binaries (on my computer but later on the mobile phone - probably with Symbian, or just with J2ME, CLDC/CDC, MIDP).

I am beginner in Java but I know something about C++ and Visual Basic so I guess it won't be a problem for me to understand Java quickly, especially that I'd like to spend much time on it and I am not in a big hurry.

Greetings!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37953
    
  22
Johny Wyenski wrote:Thanks for your answer!
. . . I know something about C++ and Visual Basic . . .
You're welcome.

Beware: lots of people think because Java looks rather like C++ that is is like C++. It isn't. There are all sorts of subtle differences, eg meaning of the keyword protected, order of execution of multiple operators.
There are also big differences, eg Java is executed by a virtual machine.
Johny Wyenski
Greenhorn

Joined: Sep 11, 2009
Posts: 21
Thanks of your answer.

I am aware of the fact that there are some differences between Java and C++. Of course, I know that applications in C++ are compiled and in the case of Java they are in the form to be interpreted by Java Virtual Machine (on PCs it is Java Virtual Machine, on mobile phones K Virtual Machine - however I don't know whether any other virtual machines than K Virtual Machine can be used on mobile phones).

Although, the most important issue for me is to know whether it is possible to send SMS from Java application on mobile phone to server and how to do it??

In general my application in Java should communicate with the user to obtain some data. Those data will be written in little text file which I need to send to server (without need to physically connect mobile phone to the computer). I thought about using SMS but also:

1) GPRS - but at this moment I don't know whether and how Java application can send packets of data with the use of GPRS.
2) connecting of Java application to internet at the moment, when sending data to server is needed, then sending it with the use of TCP/IP or any other way, finally disconnecting with internet - summing up, Java applications can connect to internet
3) VoIP - not a good way, too expensive

Greetings!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37953
    
  22
Still don't know, I am afraid. You might get better results on our micro forum. Moving thread.
Johny Wyenski
Greenhorn

Joined: Sep 11, 2009
Posts: 21
Why doesn't anybody answer :-(?

In general I want to create application for CLDC (with the use of MIDlet). (And maybe later to try the same with CDC). I want my application to create some data based on communication with the user of mobile phone and then to send little text file to the application on server computer.

I found that there exists such a thing as WMA - Wireless Messaging API. I downloaded examplary .jar & .jad files (with sources and documentation):
http://www.forum.nokia.com/info/sw.nokia.com/id/9edb3299-e0f4-449d-a2fd-fa15ddbeed8b/MIDP_2_0_Wireless_Messaging_API_Example_v1_0.zip.html
and copied those files to Sony Ericsson K750i. I installed the application, run it, it asked me whether I want to allow this application to receive SMS, I answered yes and... nothing else happened and the application exited. I run this application once more, it doesn't do anything at all and exits.

I tried to analyse the code but it didn't help me to notice what is wrong with the program.

In init() there is initialization of what and where will be sent (port number and message). (Function init is called in startApp so in my application I will need to call it in the other place in the code and I will take the content of the message from the other place that jar or jad files, as in this examplary application).

StartApp() calls init(), it listens to incoming messages, creates commend, label etc. (Probably I need to erase from this example code responsible for listening to incoming messages so that this examplary application will work on my Sony Ericsson?).

CommandAction(c,d) sends text or binary message (depending on choice in the field cg.setSelectedIndex) or exits the application for "exit".

ItemStateChanged() changes from binary to text mode and vice versa.

SendBinaryMessage(connection,destAddress,Body) and sendTextMessage(...) send the message.

I don't know what are those "private static final String".


Greetings!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with including jsapi library; sending SMS to server
 
Similar Threads
using SMS to send jar/jad OTA
JSAPI - other languages than English; MIDlet - settings loading; JSAPI - algorithm application
Want to make java application available to all user of Network
Want to make java application available to all user of Network
running application in C on mobile phone with Android