Hi there...
I ve found here the VOSK a b4j snippet... that works:
www.b4x.com
I am downloading greek model... but the text result returns is unreadable..
when i say "test"
in greek "τεστ"
For example returns:
"της"
but the right is to return "τεστ" or "test"
Thought was something like charset for java jdk 19
So I ve added at start:
#VirtualMachineArgs: -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8
#PackagerProperty: VMArgs = -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8
but nothing better ... then tried to add some lines at java code to convert charset - getting different result - but none is the right...
... what do you think ?
I ve found here the VOSK a b4j snippet... that works:
STT - Offline Speech Recognization with Vosk (JavaObject/Inline)
Hello everybody. I made an example of how to use vosk in B4J. In this example we use vosk to listen to our microphone and play the words it understands on the screen. the example is very simple and functional (at least on my PC xD) In the example you will see two labels, the top one is what...

I am downloading greek model... but the text result returns is unreadable..
when i say "test"
in greek "τεστ"
For example returns:
"της"
but the right is to return "τεστ" or "test"
Thought was something like charset for java jdk 19
So I ve added at start:
#VirtualMachineArgs: -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8
#PackagerProperty: VMArgs = -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8
but nothing better ... then tried to add some lines at java code to convert charset - getting different result - but none is the right...
B4X:
import java.nio.charset.Charset;
private final Charset UTF8_CHARSET = Charset.forName("UTF-8");
private final Charset PREVIOUSCHARSET = Charset.forName("ISO-8859-1");
....
byte ptext[] = resultText.getBytes(PREVIOUSCHARSET);
String ppv = new String(ptext, UTF8_CHARSET);
subQvEvent("recognition_result", ppv);
... what do you think ?