guyrotem / google-translate-server Goto Github PK
View Code? Open in Web Editor NEWGoogle Translate Proxy API
Home Page: https://google-translate-proxy.herokuapp.com/
License: MIT License
Google Translate Proxy API
Home Page: https://google-translate-proxy.herokuapp.com/
License: MIT License
[email protected] start /home/google-translate-server
node server.js
loading values from .env file:
{ PORT: '9333',
CLIENT_BASE_DOMAIN: 'http://localhost:5000',
DATABASE_URL: 'postgres:///google_translate_server',
ENABLE_PSQL: 'false' }
Topology initialized with:
{ externalApis:
{ googleTranslateApi: 'https://translate.google.com/translate_a/single',
googleTtsApi: 'https://translate.google.com/translate_tts',
googleTranslateWebpage: 'https://translate.google.com/' } }
Pre-loaeded last TKK: null
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::9333
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at Function.listen (/home/google-translate-server/node_modules/express/lib/application.js:617:24)
at Object.startServer (/home/google-translate-server/scripts/run-server.js:22:6)
at setProductionTopology.then (/home/google-translate-server/server.js:8:10)
at _fulfilled (/home/google-translate-server/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/home/google-translate-server/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/google-translate-server/node_modules/q/q.js:796:13)
at /home/google-translate-server/node_modules/q/q.js:604:44
at runSingle (/home/google-translate-server/node_modules/q/q.js:137:13)
at flush (/home/google-translate-server/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-10-16T05_55_46_877Z-debug.log
Starting the Java application using /opt/run-java/run-java.sh ...
ERROR: Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
exec java -javaagent:/opt/jolokia/jolokia.jar=config=/opt/jolokia/etc/jolokia.properties -Xms256m -Xmx256m -XX:+UseParallelGC -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:ParallelGCThreads=1 -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -XX:CICompilerCount=2 -XX:+ExitOnOutOfMemoryError -cp . -jar
Error: -jar requires jar file specification
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server,
because you are running on a server-class machine.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
my share host has nodejs
https://blog.hawkhost.com/2018/09/14/introducing-nodejs-applications/
and I setup it
http://prntscr.com/ohar4h
http://prntscr.com/oharlm
this one work https://google-tts.stevephuc.dev/api/languages
but then try https://google-tts.stevephuc.dev/api/tts?query=perro&language=es&speed=0.24
{"error":"Server is still waking up, waiting to get a key from Gooogle. Please try again in a few seconds. it happens often on the 1st attempt after an idle period"}
what should I do
Update 1: may be there are not process.env.port in my host , I ask host support for it.
I get this error: "Google detected too many requests submitted from this IP. service is temporarily unavailable". What shoul ı do?
Good night thanks for sharing the code, I'm doing an angular version5 based on your code: Tesla369 will receive an image, it will turn into audio, then mp3. the part of turning into text already be ready. Follow the link for the project:
Firebase:
system-monkey.firebaseapp.com
Could you please add an Access-Control-Allow-Origin
header to your API, specifically the tts endpoint?
I guess I could make a PR if you are willing to merge it.
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.