anassfiqhi / java-google-translate-text-to-speech Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/java-google-translate-text-to-speech
Automatically exported from code.google.com/p/java-google-translate-text-to-speech
What steps will reproduce the problem?
1. I build a very simple program using this API.
2. Added gtranslateapi-1.0.jar and jl1.0.jar to Libraries so they can be
compiled.
3. Run the program in NetBeans IDE by hitting play button.
4. Works excellent with ANY language.
5. Run the program outside the IDE by double clicking the jar. The audio is
'jerky' or it is not present at all. (there is NO error thrown when running the
jar outside the IDE).
What is the expected output? What do you see instead?
When running outside the IDE and using text to speech in Chinese, Japanese,
Hindi or Arabic the audio is 'jerky' or it is not present at all.
What version of the product are you using? On what operating system?
1.0
Please provide any additional information below.
I experienced this problem with Chinese, Japanese, Hindi and Arabic so far. The
other languages plays well both in IDE and outside the IDE.
This is very strange.
Here is the code
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package googletranslatetest;
import com.gtranslate.Audio;
import com.gtranslate.Language;
import com.gtranslate.Translator;
import java.io.IOException;
import java.io.InputStream;
import javazoom.jl.decoder.JavaLayerException;
/**
*
* @author PHLOO
*/
public class GoogleTranslateTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException, JavaLayerException {
Translator translate = Translator.getInstance();
String text = translate.translate("I am programmer", Language.ENGLISH,
Language.ROMANIAN);
System.out.println(text);
Audio audio = Audio.getInstance();
InputStream sound = audio.getAudio(translate.translate("This is a demo text!",
Language.ENGLISH, Language.CHINESE), Language.CHINESE);
audio.play(sound);
}
}
Original issue reported on code.google.com by [email protected]
on 9 May 2013 at 9:37
What steps will reproduce the problem?
1. First would thank you for this library. Have tested translating few
properties file into different languages. Using the following code:
Translator translate = Translator.getInstance();
String text = "";
try{
text = translate.translate(str, Language.ENGLISH, Language.CHINESE_SIMPLIFIED);
}catch (Exception e) {
String message = e.getMessage();
System.out.println(message);
}
2. I was able to use it for one day. And it worked perfectly. Later even for
one small String translation say like "Hello" it started throwing up following
error
:
java.io.IOException: Server returned HTTP response code: 503 for URL:
http://ipv4.google.com/sorry/IndexRedirect?continue=http://translate.google.com.
br/translate_a/t%3Fclient%3Dt%26text%3DHello%26hl%3Den%26sl%3Den%26tl%3Den%26mul
tires%3D1%26prev%3Dbtn%26ssel%3D0%26tsel%3D0%26sc%3D1&q=CGMSBHqsFhAY_L3FqQUiGQDx
p4NLxnAO-gsMAyd56ktUpufqNjEC280
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1459)
at com.gtranslate.utils.WebUtils.source(WebUtils.java:24)
at com.gtranslate.parsing.ParseTextTranslate.parse(ParseTextTranslate.java:19)
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Didnt found any reasons for it. Can someone please explain why is this
happening.
Its been 2 weeks since we are not able to translate anything.
Original issue reported on code.google.com by [email protected]
on 17 Apr 2015 at 7:40
What steps will reproduce the problem?
1. Use a Japanese Unicode String as the input string
2. Translate from Japanese to English
What is the expected output? What do you see instead?
I should ideally see the English translation of the Japanese String; however,
it returns a bunch of question marks. For example, it translates
夏だから今日は as ? ? ? ? ? and so on.
What version of the product are you using? On what operating system?
Android 4.4.4. Works fine for the same string on Linux.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 29 Jun 2014 at 6:41
What steps will reproduce the problem?
1. turning off wifi
2. leaving internet zone
3. running the program
What is the expected output? What do you see instead?
You would hear sound
Exception in thread "main" java.net.UnknownHostException: translate.google.com
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.gtranslate.Audio.getAudio(Audio.java:34)
What version of the product are you using? On what operating system?
the current version (I dont know)
Windows 7 64 bit
Please provide any additional information below.
That is it. I am requesting for there to be support for offline use
Original issue reported on code.google.com by [email protected]
on 5 Apr 2013 at 3:05
how to change the rate of speech ?
Original issue reported on code.google.com by [email protected]
on 12 Jun 2015 at 3:21
What steps will reproduce the problem?
1. Try to translate any sentence that include a comma (",")
What is the expected output? What do you see instead?
I would expect a translation of the complete sentence, but only the first one
is returned.
What version of the product are you using? On what operating system?
Latest version on android 2.1
Please provide any additional information below.
I've been using this code for an application in c#. Here the changelog says
"Fixed bug that limited translation to first sentence". I'm sorry I don't know
what he did, but maybe it's the same problem here. Apart from that I love your
code!
http://www.codeproject.com/Articles/12711/Google-Translator
Original issue reported on code.google.com by [email protected]
on 30 Jan 2012 at 2:58
What steps will reproduce the problem?
1. Tamil Translation not happened properly
2. sound = audio.getAudio("kaalai vanakkam", Language.TAMIL);
audio.play(sound);
3. Only it takes last word for translation
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Win7
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 21 Dec 2014 at 11:55
What steps will reproduce the problem?
1. Copy any of the detect language examples
2. run code
3. error
Translator translate = Translator.getInstance();
Language language = Language.getInstance();
String prefixLanguage = translate.detect("I am a bus"); //en
String nameLanguage = language.getNameLanguage(prefixLanguage);
System.out.println(nameLanguage); //ENGLISH
What is the expected output? What do you see instead?
print ENGLISH to screen, got array error
What version of the product are you using? On what operating system?
Please provide any additional information below.
When debugging it shows a terms of service violation.
Original issue reported on code.google.com by [email protected]
on 2 Apr 2014 at 10:30
I am developing an application for android 4.0 and wonder if this API is
compatible . I tried playing the translated text but occured exception. Do I
have to put aluguma premissão the manifest
Original issue reported on code.google.com by [email protected]
on 2 Jun 2015 at 8:40
What steps will reproduce the problem?
1. Use the meethod detect from Translator class
2. ArrayIndexOutOfBoundsException on ParseTextDetect
3. line 30
More información on the attach file.
Thanks for your excellent job with this api.
PD: Sorry, I'm speak a little english.
Original issue reported on code.google.com by [email protected]
on 30 May 2014 at 9:43
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.