mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
use the new endpoint
This commit is contained in:
parent
5517223eea
commit
de1c17625c
3 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||
const { editOrReply } = require('../../../labscore/utils/message')
|
||||
|
||||
const { googleSpeechRecognition } = require('../../../labscore/api');
|
||||
const { googleSpeechRecognitionWithLabels } = require('../../../labscore/api');
|
||||
|
||||
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 googleSpeechRecognition(context, msg.attachments.first().url)
|
||||
const recog = await googleSpeechRecognitionWithLabels(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