mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-23 13:27:04 -04:00
transcribe voice message command
This commit is contained in:
parent
26a305ea8b
commit
f408733d83
3 changed files with 61 additions and 0 deletions
|
@ -8,6 +8,7 @@ const Api = Object.freeze({
|
|||
HOST: Hosts.prod,
|
||||
|
||||
GOOGLE_PERSPECTIVE: '/google/perspective/analyze',
|
||||
GOOGLE_SPEECH_RECOGNIZE: '/google/speech/recognize',
|
||||
GOOGLE_TRANSLATE: '/google/translate/text',
|
||||
GOOGLE_VISION_COLORS: '/google/vision/colors',
|
||||
GOOGLE_VISION_FACES: '/google/vision/faces',
|
||||
|
|
|
@ -48,6 +48,12 @@ module.exports.googlePerspective = async function(context, text){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.googleSpeechRecognition = async function(context, url){
|
||||
return await request(Api.GOOGLE_SPEECH_RECOGNIZE, "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