mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-19 11:27:03 -04:00
use the new endpoint
This commit is contained in:
parent
5517223eea
commit
de1c17625c
3 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,7 @@ const Api = Object.freeze({
|
|||
|
||||
GOOGLE_PERSPECTIVE: '/google/perspective/analyze',
|
||||
GOOGLE_SPEECH_RECOGNIZE: '/google/speech/recognize',
|
||||
GOOGLE_SPEECH_RECOGNIZE_LABELS: '/google/speech/multirecognize',
|
||||
GOOGLE_TRANSLATE: '/google/translate/text',
|
||||
GOOGLE_VISION_COLORS: '/google/vision/colors',
|
||||
GOOGLE_VISION_FACES: '/google/vision/faces',
|
||||
|
|
|
@ -54,6 +54,12 @@ module.exports.googleSpeechRecognition = async function(context, url){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.googleSpeechRecognitionWithLabels = async function(context, url){
|
||||
return await request(Api.GOOGLE_SPEECH_RECOGNIZE_LABELS, "GET", {}, {
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.googleTranslate = async function(context, text, to, from){
|
||||
return await request(Api.GOOGLE_TRANSLATE, "GET", {}, {
|
||||
text: text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue