How to change voice in FreeTTS - Java - java

I am running a program in java in which i use FreeTTS Voices, what i want is to change the voice.
when i run the program it shows:
"System property "mbrola.base" is undefined. Will not use MBROLA
voices."
I use the following code to speak up the text i want
Voice voice;
voice = voiceManager.getVoice(VOICENAME);
voice.allocate();
and then
voice.speak(t4.getText());
I tried to find tutorials to insert MBROLA voices. One of the tutorial i found was on their web page: http://freetts.sourceforge.net/mbrola/README.html but i am in windows not don't know anything of MAC therefore i am unable to know how to do it. Other tutorials were on Linux and i therefore even don't understand them. I am using netbeans on windows and i want someone to clearly explain me how to do this. I am a newbie and 14 year old.

If you look at the link you submitted, there's a big message that says: "NOTE: FreeTTS support for MBROLA on the Windows platform has been troublesome in the past, but appears to have been fixed by the MBROLA team. Please refer to the FreeTTS Forum for more information."
Here's a direct link to the forums: http://sourceforge.net/p/freetts/discussion/137669/thread/848a09ab

You have to specify the path to the mbrola folder, either by properties or directly via the code:
System.setProperty("mbrola.base", "c:/.../mbrola");
For more see e.g. FreeTTS mbrola not able to find path

Related

Is there any way to get all "properties" of "control view" in desktops application window using Java or any other library?

Is there any way to get all "properties" of a "control view" in a window of desktops application using Java or any other library? I have tried with a java wrapper (www.github.com/mmarquee/ui-automation) for "Microsoft UI Automation" (https://msdn.microsoft.com/en-us/library/windows/desktop/ee684009(v=vs.85).aspx), but couldn't find a way to get all properties (elements) of a desktop window. If you know any better way to do this, please reply with sample codes.
Thanks in advance.Please refer this link (image) to get what i mean by properties
If I understand you correct, Inspect.exe is what you need. If Windows SDK is installed on your PC, Inspect.exe can be found here:
C:\Program Files (x86)\Windows Kits\<winver>\bin\x64
Source: Getting Started Guide for pywinauto. Yes, it's Python. Don't know good Java wrappers since I'm not in Java world.

add new voices to freeTTS other than us voices

I am working on a speech recognition project, therefore I need to have audio files for more than thousands of words. I have done everything correctly in order to use Mbrola voices in FreeTTS but I can only use us1,us2,us3. It doesn't
recognize any other voices.
When I try to use mbrola_en1 I get this error:
Invalid Voice: Mbrola_en1
valid voices: alan kevin kevin16 mbrola_us1 mbrola_us2 mbrola_us3
I read all the questions related to this but unfortunately none of them are answered.
Does anyone know how to fix this issue?
The MbrolaVoiceDirectory class is hardcoded for us1, us2, us3. I copied the source code of the file to my own project, pointed the freetts.voices environment variable at it, and gently hacked it to look for the other filenames.

file locked after youtube resumable upload java sdk

My java code did direct upload of a video and afterwards the program can move the file to a folder.
I have just change the code to do resumable upload but now after the upload the file cannot be moved. I can see, at least with jdk 7 on windows "Files.move", "file is being used by another process" -- (not exact message but similar). Also on mac lion with jdk6 I can confirm that file move does not work anymore but I cannot see error message because Files.move is available on jdk7 apparently.
I tried closing the file like this.
ms.getInputFileStream().close();
as well as this
new FileInputStream(ms.getMedaiFile()).close()
But no luck.
Can someone point me in the right direction?
The resumable code is essentially what is in the youtube api example/demo package.
Can you post the code in order to test this scenario? Maybe you can solve this problem in Java 7 with "try-with-resource".
See:
http://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html
http://www.javaspecialists.eu/archive/Issue190.html

Please suggest a platform to port C# app to Mac?

Greetings,
I need to port this Windows utility: http://solinker.com to Mac.
The app was written in C#, .NET 2.0.
The main requirement is:
The app should be able to talk with AppleScript to interact with Photoshop. The program is small and UI is simple so I could consider to fully rewritte the app.
Possible candidates are:
MonoMac
Unity 3D (seems it doesn't required to install the Mono)
XULRunner (Flickr Uploader written by XULR)
QT
Java (convert all the app to Java + 2 different connector to photoshop:
for Mac and for Win)
I would be appreciate for any advice!
I'm not experienced with others but can definitely suggest MonoMac. It looks and feels like any other Mac app while running on Mac. On the other hand, if the application was written with Visual Studio on Windows, it never properly works on MonoMac. So prefer MonoDevelop, if you go this route.
If you check the documentation for MonoMac, you will see they have a packager which bundles all dependencies with the final app. So, no need for a seperate Mono install:
http://www.mono-project.com/MonoMacPackager
As for AppleScript, MonoDevelop does some wrapping of AppleScript. You should take a look at their source:
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacInterop/AppleScript.cs
I would say MonoMac is your best approach.

how to run java applications on mobile?

hi
what do i need to do in order to make my java app executable on a mobile (let's say Nokia Symbian for example) . Do all jar files run on mobiles???
is there a certain way of programmings am supposed to use ?? are there specific classes am supposed to use???
Do all jar files run on mobiles???
No
is there a certain way of programmings am supposed to use ??
Yes , you need to use j2me for specific MIDP CLDC platrofm . have a look here
are there specific classes am supposed to use???
You can use the classes available over the platform , alternatively you can also add the external library
Easy, seems like your about to have a stroke. Start reading some articles about getting started on J2ME, try these ones out:
Link 1
microjava.com
forum.nokia.com
You have to know, that depends on the your orientation of you application, not all applications runs in all cell phones, is like in computers, a Windows application won't work on Linux, unles you use a Virtualizer. My point is, start reading all the documentation you you cant, and take it slow.
Some OS's like Symbian Can run java package file i.e. .jar files.
And Android lacks that capability.
Phones with MDIP runs .jad files that is a Java app made using the J2ME API.
Android generate Dalvik Bytecode and run .apk packages on the phone.

Categories