Johny Wyenski

Greenhorn
+ Follow
since Sep 11, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Johny Wyenski

Hello,

I am new to the world of non-relational database and I look for some advices on how to start.

I need to have table that represents system being optimized. It should have some columns with input data (some of those are common for all systems and some are specific for the system so I know all the columns I need to use not earlier than when I need to create first row in database) and output data (columns are always the same).

I need to be able to visualize the data being stored, i.e. dynamically search for rows where input parameters are known (for example first column is equal to abc and second column is between 15 and 20) to be able to receive corresponding output values (several last columns).

I thought about using MongoDB because it has the best support and is the most widely used non-relational database. Please enlight me if it is good choise or I need other NoMQL (which one?).

I have started with creating some simple code:



this is why I started wondering if it is good to use MongoDB or if I do something incorrectly. Definitely adding row as "first entity" is not OK because I would need something like ID here. And using foreach later is perhaps not needed at all, based on earlier lines of the code.

Class with data looks as follows:



Could you give me any suggestions how I should proceed with my case?

Best regards!

PS In order to avoid hidden crossposting - this post can be found at "Database with dynamically created columns in C#" in google group https://groups.google.com/forum/#!topic/mongodb-user/8Uw7YlLq0K4
11 years ago
OK, it helps, thanks. I use it:



And text fields were explained here: https://coderanch.com/t/563704/java/java/text-field-new-window#2559274 (in case somebody searching for similar problem finds this thread).

Regards!
13 years ago
Hello,

I have posted this question on the other forum but there is no answer from them and it is not in English language after all.

I can create textfield but with ordinary label I have difficulties:



For textfield I needed:



I do in analogical way with label but it does not want to appear at all. I was also looking for (http://docs.oracle.com/javase/7/docs/api/javax/swing/JLabel.html#JLabel%28java.lang.String,%20int%29) how to place label in the given place (by its coordinates x and y) but I can see only constants like LEFT, CENTER, RIGHT, LEADING or TRAILING.

Regards!
13 years ago
Thanks!

OK, solved. I needed to add:



but also



Regards!
13 years ago
Dear John,

thank you for your answer! As I wrote in my first post, I have already tried it. So I change again to the previous version of code:



and I can see the same what previously:

cannot find symbol
symbol: method getContentPane()
location: class NameOfMyClass



The NetBeans IDE can create this symbol for me, but it still needs to be implemented (and I think I don't need to implement it but rather to change something in the code quoted above):



Regards!
13 years ago
Dear all,

I'd like to add text field and read its value. I have posted this question on the other forum, but it was not in English language and finally the problem has not been solved.

The code which I have:



Previously I was trying to use



The application launches (in previous and actual version of code) but does not show any text box. How may I correct the code?

Regards!
13 years ago
OK, so I'm going to post a new message on the other forum. And thank you again Rob Spoor for your very useful answer. In the future I'm going to write links to the other forum in case of crossposting or even avoid crossposting at all.
Regards!
13 years ago
Thank you!

I have the following code (this is one of menu options):



The difficulty for me is range of variables parent (and, in analogical way, width and height):

parent is not public in java.awt.Component; cannot be accessed from outside package



and using drawRect and drawString in the context of the code above.

Regards!
13 years ago
Dear all,

I'd like to create a picture in a memory, then save it to the file and show preview (after creating in memory) on the screen.

I have started in such a way that from Oracle documentation I gave fragment of the code to my menu:



As far as I understand, now I have got the picture created in the memory. Then I need to show in in the window or to save to the file (I'm interested in both). How can I do it?

I also wonder how to e.g. draw rectangle or write text. I was doing it in such a way:



but I don't know how to apply it to pix[].

Regards!
13 years ago
May I wish for the answer, please?
Regards!
PS This is not popular Cairo graphics package, this is Cairo for Asterisk and speech recognition.
Hello!

I've got two files (they are part of examplary application from Cairo/Zanzibar, about main application here: http://www.spokentech.org/openivr/index.html): Parrot.java and parrot.vxml. I uploaded those here: http://www.speedyshare.com/files/20130100/parrot.rar . The size is 2kB. The whole can be downloaded here: http://sourceforge.net/projects/openivr/

In general it works like this: user calls from mobile phone to server, server receives the call with Asterisk application. This Asterisk redirects it to Cairo/Zanzibar, which has got two other applications integrated inside itself. One is for speech recognition (Sphinx4), the other for creating speech from text (FreeTTS). I need speech recognition but I don't need to generate speech from text. I saw there is examplary application Parrot which repeats what it can understand from incoming call. There is Parrot.wav in this application but I don't see any place in the code where is is used. I'd like to play wav file instead of TTS reading the content of parrot.vxml file.

You can download the application and skim the code. Parts of it are also included here.

In Cairo Parrot.java the most crucial is this part of code:



And parrot.vxml looks like this:



There is also parrot.wav but I don't see any place in the code where it is used so perhaps it is not.

Regards!
Hello!

I try to follow steps mentioned here (http://www.speechforge.org/projects/cairo/install.html).

The first thing is about JMF. I downloaded jmr-2_1_1e-linux-i586.bin (the other thing is that I've got 64 bit computer). I found http://www.luniks.net/luniksnet/html/java/jtvd/doc/jmf.html . I executed bin file in /usr/lib as it is written in this mini-howto. Then I edited /home/mainaccount/.bash_profile file and added those three lines mentioned in mini-howto before "unset USERNAME" line. But Cairo tutorial (http://www.speechforge.org/projects/cairo/install.html) says "This will install jmf.jar and sound.jar to the lib/ext directory of your installed JRE". It didn't. So I tried to find manually files jmf.jar and sound.jar in /usr/lib/JMF-2.1.1e but I found only jmf.jar. There was no sound.jar. What to do with the missing sound.jar file?

I downloaded jdk-6u16-nb-6_7_1-linux-ml.sh and executed. It created directory jdk1.6.0_16 in /home/mainaccount directory which is my home directory. Inside it I see some directories, including jre directory. I see that I need to set my JAVA_HOME variable. But using google.com for "java_home jdk jre" gives disambiguous results - some say that it should point to jdk, some jre. Which of these directories should be indicated by this variable? Would setting this 'export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java' in ~/.bash_profile be the proper thing?

Is there any command or set of commands in Mandriva (or packets which are especially useful) to install all of required things with urpmi rather than by downloading, setting path etc.?

Regards!
Hello!

I've got Skype and Sphinx4 (speech recognition engine). Skype normally sends speech to speaker. Sphinx4 normally receives speech from microphone. I'd like to change it in such a way that output of Skype would become input of Sphinx4. In other words, I've got:
( Skype -> speaker ) AND ( microphone -> Sphinx4 )
and I'd like to have:
( Skype -> Sphinx4 )
I thought it may be impossible to do it directly so it may be better thing to do:
( Skype -> socket -> Sphinx4)
I just wonder what can be this socket. I thought about using TCP or UDP socket, in other words TCP connection on localhost.
And my question is as follows: how to let Sphinx4 to receive speech from socket, rather than from microphone?
At this moment code looks as follows:


Greetings!
15 years ago
Thank you for your answers :-)!

It looks like I still need to learn much about programming for mobile phones. Can you suggest me any book so that I can understand these issues better (preferably betterworldbooks.com or similar site).

Just yesterday somebody has written on CMU Sphinx forum that "Symbian part was yesterday committed to pocketsphinx, you see it's a few required modules for Nokia SDK: http://cmusphinx.svn.sourceforge.net/viewvc/cmusphinx?view=rev&revision=9470 ". So it looks like they work exactly at this moment on porting PocketSphinx to Symbian. Can those things which are to be downloaded on that page also be used for Android? Or do I need eventually to choose rather Symbian than Android?

I still work on what I have written fifth paragraph of my second post (beginning with "May I ask you about simpler thing").

Greetings!
15 years ago
Thanks for your answer :-)!

Hm, I've got dilemma. Somebody told me that Symbian is widely used for commercial software so people who develop for Symbian don't want to share their knowledge too easily. On the other hand man from CMU Sphinx forum told that "Pocketsphinx is used successfully on Symbian with minimal effort" (http://sourceforge.net/projects/cmusphinx/forums). Now you say that "Android, by definition, is Java". This application which I'd like to run (PocketSphinx) is in C, not in Java. On the other hand, that man has written that it can be used with minimal effort. For me it looks like porting for Symbian or Android is relatively difficult thing. Are you sure there is no simpler way of running it than porting?

This PocketSphinx is generally for embedded devices, so not for any exact model of phone. There are two constraints, first is price (max 160 euro), second is hardware (http://cmusphinx.sourceforge.net/sphinx4/doc/Sphinx4-faq.html#j2me). I still need to choose which mobile phone would be best choice.

You say that TTS is primarily mathematical. PocketSphinx is Speech to Text (Automatic Speech Recognition), not Text to Speech (synthesizer). But it also involves some sophisticated Maths.

I'm not familiar with terms JNI, Dalvik JVM (however what is JVM and KVM of course I know) and piggybacking on DSP. I see that Java Native Interface allows to run Java code in JVM with use of C or other libraries. I don't see any need for this but maybe I miss something. PocketSphinx is C so I don't see any need for Java. And if porting to Symbian/Android also requires changing from C to Java before porting, isn't it too much to be done? Other thing, what is this piggy-backing on a DSP? There are too many references for piggybacking on Wiki .

May I ask you about simpler thing, not strictly connected with Android? I've got my application in Sphinx4. There are also examplary appications for Sphinx4 and PocketSphinx. I can run demos from PocketSphinx (as explained in first post), as well as demos from Sphinx4. I can change source code of demos from Sphinx4 to perform my task. I'd like to do similar thing with PocketSphinx, but even if it should be easy task, I cannot do it. In Sphinx4 it is much simpler because all source files are in one directory. In PocketSphinx it is done in somehow different way. (http://cmusphinx.sourceforge.net/html/download.php). Without ability to move my application from Sphinx4 there is no need for me to port this PocketSphinx to Android/Symbian.

Maybe this cheating would also be good idea for me. However I need to use it for Polish language which probably is not available. How to digitize audio and where to find those Google's speech-recognition servers?

Greetings :-)!
15 years ago