mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
update transcription to use obelisk service
This commit is contained in:
parent
8f2727456b
commit
0cac2568d8
4 changed files with 11 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||
const { editOrReply } = require('../../../labscore/utils/message')
|
||||
|
||||
const { googleSpeechRecognitionWithLabels } = require('../../../labscore/api');
|
||||
const { transcribeWithSpeakerLabelsObelisk } = require('../../../labscore/api/obelisk');
|
||||
|
||||
const { STATICS } = require('../../../labscore/utils/statics');
|
||||
const { codeblock, icon } = require('../../../labscore/utils/markdown');
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
if(!msg.attachments.first()) return editOrReply(context, createEmbed("warning", context, "No voice message found."))
|
||||
if(!msg.attachments.first().url.split('?')[0].endsWith('voice-message.ogg')) return editOrReply(context, createEmbed("warning", context, "No voice message found."))
|
||||
|
||||
const recog = await googleSpeechRecognitionWithLabels(context, msg.attachments.first().url)
|
||||
const recog = await transcribeWithSpeakerLabelsObelisk(context, msg.attachments.first().url)
|
||||
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
description: codeblock("md", [ recog.response.body.transcription_with_speakers ]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue