Linux/Ubuntu - Speech Synthesis from Java without using FreeTTS - java

I've spent a pair of days trying to make it work: Speech synthesis from Java with FreeTTS on a Ubuntu system and it seems to be far more complicated than what i expected, if possible. There are some problems with this configuration i just can't solve.
So, i've changed my mind and have decided to make it in some other way. I just need to synthesize some texts during the execution of the app, so my question is: Someone knows any other way of making it possible and still be platform-independent (assuming i'll have to install some kind of extra-software in the machine(s) i'll need to run it)?
Thanks a lot.

As far as I remember there are a plenty of implementations from F.A.Q. for Java Speech API, but non of them is OS independent.
Another way is to find (using Google) some new cloud services (for example) which provides API for voice synthesis.

Ubuntu 8.10 has a bug in it's FTTs version; try another software of speech synthesis...

Related

Python for Android Apps

I've learnt python recently and I want to make an app for android. But everywhere on the net, it seems Java and Eclipse are the only ones that can be used.
So, my question is:
1) Can I use python to make an android app?
2) What kind of platform should I use to make an app with python?
Thanks guys!
If you're just looking to run Python scripts, try QPython.
If you're looking to make your Python code run like a native app, or just something more robust than the above, try SL4A.
If you're looking to effectively use Python as a library, and compile an .apk with the Python library included, try Kivy: github.com/kivy/python-for-android.
That said, you'd likely get a lot of benefit from learning Java, and not just for programming natively in Android (which would give you access to a much wider feature set and make your app run more efficiently).
Check out the Scripting Layer For Android, aka SL4A.
Here is a blog for getting started. The blog promises more entries in the series but there don't seem to be any. Still, it is a great starting point. There's quite a few parts to pull together so be patient and check the bottom of that blog entry for dozens of useful links.
If you want to contain everything to the Android device, including the IDE (pretty slick), check this out.
Here's a book from APress that could help with more advanced concepts: Pro Android Python with SL4A

java voice command

I'm still pretty new to java and I was thinking about making a program where the computer could listen to you talking and write what you said on word or something using the java Robot. Honestly, I have no idea where to start with this and could really use some help on this. Also, I was looking around on my computer and noticed that it does have a voice engine of some sort, is there a way I could implement that into my program?
Thanks in advance
If you want to tap into your dictation software's facilities and hook them into your Java program, then start by taking a look at the JavaSpeech API or the Microsoft Speech API along with the Java Native Interface (JNI). The latter isn't a simple project for a beginner. The former, if your dictation software is compatible, could be something in the order of a few weeks of work for a relative beginner.
For making the dictated speech appear in Word or other external program, it's not clear to me where your Java program would fit in here: your dictation software will natively provide the facility of dictating to whatever the currently active window is, presumably.
Speech Recognition is a complex programming to understand. as you are a beginner go head and see Sphinx4 for recognition written entirely in java and FreeTTS as Synthesizer written entirely in java. first make a simpler recognizer then you can think of Dictation using JNI

Voice to text conversion with JSAPI

If anybody knows about 'voice to text' conversion using java, please give me some knowledge.
Thanks!
as far as i know, the way to use this is the JSR 113 Java Speech API 2.0
The advantage in using would be the offline functionality without an internet connection.
But unfortunately the leading company seems to terminated their intentions for this project, the homepage is down (http://www.conversay.com).
Looking at answers to a similar question, the prospects don't look encouraging. However I did find something despite the relative dearth of activity around JSAPI implementations.
Take a look at the Java Wrapper for Cepstral TTS project on Sourceforge. It relies upon the Cepstral TTS engine which is available for several languages and speakers as well versions targeting desktop, mobile and telephony server deployments.
Disclosure: I have no relationship to Cepstral nor have I used their products.
For speech recognition, see also this thread. If not using android, you might want to check out CMUSphinx.

Starting with Android: Java or Python (SL4A)

I just ordered an Android smartphone and want to start playing around with creating my own applications. Now the question is which language to use, the native Java or Python using SL4A (former ASE).
I tend to Python, as I know it much better than Java, but I'm wondering what I would be missing using a "second class" language on Android. On the SL4A website it is also stated to be alpha quality software, which is not exactly encouraging.
I'm also not quite sure what the limitations of the scripting environment are and if they would be problematic.
At the moment you cannot create a releasable program with Python (or any other scripting language) using SL4A. I have heard rumours that this is something Google is working on, but even if they do enable it Python apps are likely to be slow and power-hungry compared to Java. Also the scripting API only gives you access to a limited subset of the native Java API. I would not consider using SL4A for serious development work at the moment, only for one-off scripts and prototyping.
Take a look at Scala. It is a statically typed language on the JVM, but uses type inference to remove most of the noise that you get in Java. It also fully supports functional programming, and has a lot of pythonish features. Because it is statically typed it is as efficient as straight Java with none of the disadvantages. IMHO it is the language that Java should have been in the first place.
A lot of people are blogging about using Scala on Android, so Google around for more information.
More likely will depend what type of applications you will develop.
I would start with Java to become familiar with Android SDK. Anyway first you need to look into some examples, tutorials. Most of them are done in Java, and only a few, probably on the dev site of SL4A for that.
Also there is native development Android NDK, that can be programmed with C++.
But anyway Java rules for general applications.
Adding an update to Dave Kirby's answer:
Issue 55, Distribute scripts as APKs, in the issue tracker at SL4A deals specifically with that.
There is a solution being worked out (may be complete by now) described at SharingScripts. The only issue seems to be that you need to have a interpreter APK already installed.
you may want to check out Ruboto it is a framework for developing Android apps based on JRuby which means your JRuby code can call Android APIs and can also be called back from the Android Java side.
Here is an introduction article .
Consider ising Kivy, if you want to write Android apps with Python. The process of packing script to .apk file is described here.
The problem is, resulting .apk will be big (~7Mb for 300Kb data). It is obvious, because you need to pack there Python runtime and all libraries.
Another solution I have heard of, is Pygame for Android, but it works on lower lewel, so you need to draw graphics manually.
Unfortunately, I have not tried any of this ways yet, but it looks, that I'm going to start using kivy soon.

Java for a video based application: Good choice?

I am in the concept phase of an application that is going to have a lot of Audio/Video input and output. I want to do it in Java; but somehow am not fully convinced yet. What do you think? How bad could it be? And any advices?
Why I am thinking Java:
It's the language I'm most comfortable with.
Easier cross platform migration would be a bonus.
Cannot afford commercial platforms (like .NET) or not good enough in other free alternatives (like Python)
I'm also slightly inclined towards C++/Qt; but that would take more time for me as I'm not great in that and I am a bit worried about maintainability.
If you're interested, check out Xuggler. It exposes all the power of FFmpeg, but as a Java API that runs on Windows, Mac and Linux. The advantage is you get all the power of FFmpeg but from Java. The disadvantage is it requires the FFmpeg native DLLs/shared-libraries to be installed.
Easier cross platform migration would be a bonus.
Audio and video means you will be dealing with dedicated native libraries and JNI-wrappers for each supported platform; in this case, the cross-platform argument for Java does not really apply.
I believe that when you want to write an audio/video application, the programming language you will use is the second most important thing. The most important thing is the audio/video framework your application will use since this is what defines your capabilities.
I am aware of two popular generic video frameworks that can be used to accesd most multimedia types: Directshow and ffmpeg. Directshow is tied with windows, so only ffmpeg is left.
Ffmpeg has versions in both windows and unix and, although it is written in C, it can be used from a lot of languages.
There is even a number of java wrappers for ffmpeg (for instance, take a look at xuggle)!
C++ would be the first choice because of performance concerns often present in Audio/Video processing as well as the range of available libraries for video/audio.
You do make a good point about being familiar with Java. If you are pressed for time, this is even more important. However if you can spare some time for learning, C++ would be well worth it.
Regarding .NET: The .NET SDK with everything you need is freely downloadable. Get hold of a free IDE such as SharpDevelop and you are up and running. It's Visual Studio that costs money, you don't need Visual Studio to do .NET development.
Rusty.in,
How about trying to do JavaFX Media API. Recently, the version of the JavaFX is 1.2.0 with GUI Application as well. It supports the Swing. The grammar is based on the script style; however, you can deploy the existing Swing components into the JavaFX.
I hope it helps.
Tiger
Rusty, what did you wind up doing? I too have a video app I'd like to do, but really would prefer Java/JavaFX over C++. The thing about the using Flash and/or the current JavaFX video support is that Flash video playback is not frame-accurate. I really need to be able to stop/start/step on individual frames like you can with QuickTime.
Has anyone tried doing playback with Xuggler and Java/JavaFX?

Categories