Use java-google-translate-text-to-speech on android



  • There was a need to translate the user ' s English text from Russian to Internet, and decided to use it. https://code.google.com/p/java-google-translate-text-to-speech/ but there's a problem right away. This is the code:

    Thread one = new Thread() {
        public void run() {
            try {
                Translator translate = Translator.getInstance();
                String text = translate.translate("I am programmer", Language.ENGLISH, Language.PORTUGUESE);
                Log.d("TEXT: ",text);
            } catch(Exception v) {
                Log.d("ERR: ", v.toString());
            }
        }
    };
    one.start();
    

    Flying:

    W/System.err: java.io.FileNotFoundException: http://translate.google.com.br/translate_a/t?client=t&text=I%20am%20programmer&hl=en&sl=en&tl=pt&multires=1&prev=btn&ssel=0&tsel=0&sc=1
    

    The code is copied from the interpreter's sketch, I don't understand why it doesn't work.



  • The library used outdated equipment. APIthat doesn't work anymore.
    Reference to API is not available: http://translate.google.com/translate_a/
    You'll have to find another way.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2