I am new to java and I followed the video tutorial on text-to-speech in java at this link: https://www.youtube.com/watch?v=ameD1ocbn9s
Here I ran into a problem with the eclipse marker when compiling this program. He says the following:
Here is my code:
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.text.MessageFormat; import javazoom.jl.decoder.JavaLayerException; import javazoom.jl.player.Player; import us.monoid.web.BinaryResource; import us.monoid.web.Resty;
Here is the complete error:
java.io.IOException: Error while reading from GET: [503] Service Unavailable <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>http://translate.google.com/translate_tts?ie=UTF-8&q=hello+kalanka&tl=en&prev=input</title></head> <body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById('captcha');if(e){e.focus();}"> <div style="max-width:400px;"> <hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br> To continue, please type the characters below:<br><br> <img src="/sorry/image?id=15657022896595218819&q=CGMSBGf3MFUY-PWSuQUiGQDxp4NLgYkSgFOxxcQGJWJm5jZQLxCJi6c&hl=en&continue=http://translate.google.com/translate_tts%3Fie%3DUTF-8%26q%3Dhello%2Bkalanka%26tl%3Den%26prev%3Dinput" border="1" alt="Please enable images"><br><br><form action="CaptchaRedirect" method="get"><input type='hidden' name='q' value='CGMSBGf3MFUY-PWSuQUiGQDxp4NLgYkSgFOxxcQGJWJm5jZQLxCJi6c'><input type="hidden" name="continue" value="http://translate.google.com/translate_tts?ie=UTF-8&q=hello+kalanka&tl=en&prev=input"><input type="hidden" name="id" value="15657022896595218819"><input type="text" name="captcha" value="" id="captcha" size="12" style="font-size:16px; padding:3px 0 3px 5px; margin-left:0px;"><input type="submit" name="submit" value="Submit" style="font-size:18px; padding:4px 0;"><br><br><br></form> <hr noshade size="1" style="color:#ccc; background-color:#ccc;"> <div style="font-size:13px;"> <b>About this page</b><br><br>Our systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot. <a href="#" onclick="document.getElementById('infoDiv').style.display='block';">Why did this happen?</a><br><br> <div id="infoDiv" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;"> This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the <a href="//www.google.com/policies/terms/">Terms of Service</a>. The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible. <a href="//support.google.com/websearch/answer/86640">Learn more</a><br><br>Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly. </div> IP address: 103.247.48.85<br>Time: 2016-04-30T14:02:34Z<br>URL: http://translate.google.com/translate_tts?ie=UTF-8&q=hello+kalanka&tl=en&prev=input<br> </div> </div> </body> </html> at us.monoid.web.AbstractResource.fill(AbstractResource.java:51) at us.monoid.web.Resty.fillResourceFromURL(Resty.java:432) at us.monoid.web.Resty.doGET(Resty.java:388) at us.monoid.web.Resty.bytes(Resty.java:355) at main.TextToSpeech.speech(TextToSpeech.java:42) at main.TextToSpeech.main(TextToSpeech.java:28) Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://ipv4.google.com/sorry/IndexRedirect?continue=http://translate.google.com/translate_tts%3Fie%3DUTF-8%26q%3Dhello%2Bkalanka%26tl%3Den%26prev%3Dinput&q=CGMSBGf3MFUY-PWSuQUiGQDxp4NLgYkSgFOxxcQGJWJm5jZQLxCJi6c at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at us.monoid.web.AbstractResource.fill(AbstractResource.java:30) ... 5 more
Please help me in this code ....
java eclipse youtube
Kalanka
source share